GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow diligent to link a static DirectXShaderCompiler by Lokomojo · Pull Request #723 · DiligentGraphics/DiligentCore

Conversation

@Lokomojo

@Lokomojo Lokomojo commented Nov 17, 2025

Copy link
Copy Markdown

Add a flag (off by default) to allow diligent to use a statically-linked DirectXShaderCompiler

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Lokomojo
Lokomojo requested a review from TheMostDiligent as a code owner November 17, 2025 19:11
TheMostDiligent
TheMostDiligent reviewed Nov 20, 2025
View reviewed changes

@TheMostDiligent TheMostDiligent left a comment

Copy link
Copy Markdown
Contributor

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.

This change makes sense, there are few minor questions + formatting.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Graphics/ShaderTools/CMakeLists.txt
Comment on lines +152 to +153
LLVMSupport
dxcompiler

@TheMostDiligent TheMostDiligent Nov 20, 2025

Copy link
Copy Markdown
Contributor

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.

Why are these public dependencies?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lokomojo Lokomojo Nov 27, 2025

Copy link
Copy Markdown
Author

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.

See below for reasons - if you'd prefer to make the consumer link the libraries manually that's your call of course ;)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Graphics/ShaderTools/CMakeLists.txt
)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_link_libraries(Diligent-ShaderTools PRIVATE dl)

@TheMostDiligent TheMostDiligent Nov 20, 2025

Copy link
Copy Markdown
Contributor

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.

I think that dl should not be needed when linking statically - can be in the else() branch

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Graphics/ShaderTools/CMakeLists.txt Outdated
cmake_policy(SET CMP0079 NEW)
target_link_libraries(SPIRV-Tools-opt
PUBLIC
LLVMSupport

@TheMostDiligent TheMostDiligent Nov 20, 2025

Copy link
Copy Markdown
Contributor

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.

Why is it public dependency?

Also, why is this dependency needed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lokomojo Lokomojo Nov 27, 2025

Copy link
Copy Markdown
Author

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.

Well, I made it public so that anything consuming this library will inherit the dependency. When static linking on some systems the builid will fail if the host executable is not itself linked against the dependencies.

Needed due to

/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o): in function `spvtools::opt::ReplaceDescArrayAccessUsingVarIndex::ReplaceAccessChain(spvtools::opt::Instruction*, spvtools::opt::Instruction*) const':
./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/replace_desc_array_access_using_var_index.cpp:83:(.text+0x385): undefined reference to `llvm_assert'
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o): in function `spvtools::opt::ReplaceDescArrayAccessUsingVarIndex::HasImageOrImagePtrType(spvtools::opt::Instruction const*) const':
./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/replace_desc_array_access_using_var_index.cpp:157:(.text+0xf0c): undefined reference to `llvm_assert'
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o): in function `spvtools::opt::(anonymous namespace)::GetValueWithKeyExistenceCheck(unsigned int, std::unordered_map<unsigned int, unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int> > > const&)':
./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/replace_desc_array_access_using_var_index.cpp:34:(.text+0x1c26): undefined reference to `llvm_assert'
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o): in function `spvtools::opt::ReplaceDescArrayAccessUsingVarIndex::CreatePhiInstruction(spvtools::opt::BasicBlock*, std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int) const':
./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/replace_desc_array_access_using_var_index.cpp:424:(.text+0x1f6b): undefined reference to `llvm_assert'
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o): in function `spvtools::opt::ReplaceDescArrayAccessUsingVarIndex::GetConstNull(unsigned int) const':
./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/replace_desc_array_access_using_var_index.cpp:400:(.text+0x2209): undefined reference to `llvm_assert'
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: lib/DirectXShaderCompiler/lib/libSPIRV-Tools-opt.a(replace_desc_array_access_using_var_index.cpp.o):./DirectXShaderCompiler/external/SPIRV-Tools/source/opt/ir_builder.h:294: more undefined references to `llvm_assert' follow

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Lokomojo
Allow diligent to link a static DirectXShaderCompiler
5849517
@Lokomojo
Lokomojo force-pushed the master branch from 3a14715 to 5849517 Compare November 27, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TheMostDiligent TheMostDiligent TheMostDiligent left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Lokomojo @TheMostDiligent
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.