-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUILD_SHARED_LIBS output libSPIRV-Tools.a instead of libSPIRV-Tools.so #3626
Comments
Confirmed in b27e039 while trying to update my Mageia package. I see Fedora maintainer @airlied also chose to revert #3490 to get things to work: https://src.fedoraproject.org/rpms/spirv-tools/c/5c006681b867e6264294b4ac341f1bf9fbf2214e?branch=master |
Hi @SakuraLife & @akien-mga, Sorry you're having trouble with this. I authored #3490 to fix #3482. #3490 keeps the While working on this, I observed that the existing build rules create (and install) the following files regardless of the value of
Clearly the I have to admit it seems a little odd to have both This is all a bit of a mess, and I apologise for making this worse. Maybe reverting #3490 is the best option. However, this change has now been in master for a little over 2 months now, and I fear this might break people now depending on using Before making any further changes that might impact yet more people, I'd be interested in hearing any suggestions on how to best fix this. |
One usage of |
I've filed #3909 as it's clear there's a lot of long-term work to be done here. To fix the immediate issue of rebuilding a package, I've started taking a look at adding some new CMake flags that can emulate the old behavior / output. These will default to off, so not to disrupt other people. |
If enabled the following targets will be created: * `${SPIRV_TOOLS}-static` - `STATIC` library. Has full public symbol visibility. * `${SPIRV_TOOLS}-shared` - `SHARED` library. Has default-hidden symbol visibility. * `${SPIRV_TOOLS}` - will alias to one of above, based on BUILD_SHARED_LIBS. If disabled the following targets will be created: * `${SPIRV_TOOLS}` - either `STATIC` or `SHARED` based on the new `SPIRV_TOOLS_LIBRARY_TYPE` flag. Has full public symbol visibility. * `${SPIRV_TOOLS}-shared` - `SHARED` library. Has default-hidden symbol visibility. Defaults to `ON`, matching existing build behavior. This flag can be used by package maintainers to ensure that all libraries are build as shared objects. Issue: KhronosGroup#3626 See also: KhronosGroup#3909
Hi @SakuraLife and @akien-mga I've created #3910 which adds the If at all possible, please can you confirm that this fixes your problem? I'd also be very interested in hearing your thoughts on #3909. Cheers, |
@ben-clayton confirmed, everything looked the same as before. |
BUILD_SHARED_LIBS
I think this option should lead to libSPIRV-Tools.so. but today I only find libSPIRV-Tools.a after compiling.After searching log, I think maybe it's related to #3490
This is my cmake options
The text was updated successfully, but these errors were encountered: