From fcbf034a9197b8532dab43ae5cb1c92dc7804b25 Mon Sep 17 00:00:00 2001 From: maj00r Date: Thu, 10 Sep 2026 14:08:48 +0200 Subject: [PATCH] spell the delay-load flag for the driver in use clang's GNU driver read /DELAYLOAD:dxcompiler.dll as a file name. CMake's LINKER: prefix emits -Xlinker for it and passes it bare under MSVC. The other raw linker flags in the tree sit inside if(MSVC), which is false for this driver, so they never reach the command line. --- betterRenderer/mashadercompiler/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/betterRenderer/mashadercompiler/CMakeLists.txt b/betterRenderer/mashadercompiler/CMakeLists.txt index 809986ef..f6d43bb7 100644 --- a/betterRenderer/mashadercompiler/CMakeLists.txt +++ b/betterRenderer/mashadercompiler/CMakeLists.txt @@ -16,7 +16,9 @@ target_link_libraries(MaSzynaShaderCompiler nvrhi yaml-cpp Microsoft::DirectXSha if (WIN32) target_link_libraries(MaSzynaShaderCompiler delayimp) - target_link_options(MaSzynaShaderCompiler PRIVATE "/DELAYLOAD:dxcompiler.dll") + # LINKER: lets CMake spell this for whichever driver is in use - passed + # straight through, clang's GNU driver reads /DELAYLOAD as a file name. + target_link_options(MaSzynaShaderCompiler PRIVATE "LINKER:/DELAYLOAD:dxcompiler.dll") endif () # We later pass the DXIL.dll parent directory as first argument to MaSzynaShaderCompiler so that it can sign DX12 shaders