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
Fix the link order of libglslang and libHLSL #463
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,8 @@ endif(SHADERC_ENABLE_INSTALL) | |
|
||
find_package(Threads) | ||
target_link_libraries(shaderc_util PRIVATE | ||
glslang OSDependent OGLCompiler HLSL glslang SPIRV | ||
SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT}) | ||
glslang OSDependent OGLCompiler glslang HLSL SPIRV | ||
SPIRV-Tools-opt SPIRV-Tools ${CMAKE_THREAD_LIBS_INIT}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CMake already has a "PUBLIC" dependency from SPIRV-Tools-opt to SPIRV-Tools. So it seems this is not necessary? What error are you trying to fix here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct me if I'm wrong, but those dependencies only do anything if you actually build SPIRV-Tools-opt / SPIRV-Tools using your own cmake scripts, from third_party. But in practice, I am not building libshaderc against the third_party versions - I am building them against the system-wide SPIRV-Tools installation. (As the commit message points out) The concrete issue being solved here is sjnewbury/gentoo-gpu#22, which prevents I can either ship the work-around from this commit as part of the gentoo package, or I can try submitting it upstream - which is what I tried here. |
||
|
||
shaderc_add_tests( | ||
TEST_PREFIX shaderc_util | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glslang was already listed before and after HLSL.
I don't know the details but that's usually necessary when there's a circular dependency between the two. Are you sure that HLSL itself doesn't depend on glslang?
We may require a second mention of HLSL, something like:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work as-is for me already, but I suppose I can add the extra link to be on the safe side.