Page MenuHomeSolus

Build `spirv-tools` and `glslang` as shared libraries
Open, NormalPublic


Currently these packages contain only static libs which get "compiled-in" in all their reverse dependencies. According to CMakeLists, these packages can be build as shared libs if BUILD_SHARED_LIBS flag is set while invoking CMake (see glslang script, for spirv-tools the flag is the same).
I've found revdeps of glslang which currently contain copies of glslang code instead of linking to shared lib:

  1. vulkan-tools
  2. libplacebo

Also glslang is a dependency of MangoHud (D8365) which could make use of shared library too. Probably there are other revdeps of glslang that I didn't found.
I've tried building shared spirv-tools and glslang locally and rebuilding libplacebo against them - it correctly links to shared libglslang and works as expected (Vulkan renderer in mpv works). I wonder about opinion of Core and / or Globals on this matter - is there a reason why we build these libraries as static and should we switch them to shared?

Related Objects

Event Timeline

aleksvor created this task.Jun 4 2020, 7:39 AM
Jacalz added a subscriber: Jacalz.Jun 4 2020, 1:49 PM
Girtablulu added a subscriber: Girtablulu.EditedJun 4 2020, 4:01 PM

ikey build them static but couldn't find a reason why

DataDrake triaged this task as Normal priority.Nov 14 2020, 6:11 PM
DataDrake moved this task from Backlog to Improvement on the Software board.
DataDrake added a subscriber: DataDrake.

I can't see a reason not to, but we might still need the static libs for some things. So testing needed.

Reasons for only building statically are mainly stability and linking issues (example), but mostly of them have been addressed nowadays.