File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
pkgs/development/compilers/llvm/common Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,20 @@ stdenv.mkDerivation rec {
7474 --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS '' ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \
7575 'find_program( LLVM_SPIRV llvm-spirv PATHS "${ spirv-llvm-translator } /bin" NO_DEFAULT_PATH )'
7676 ''
77- + lib . optionalString ( stdenv . hostPlatform != stdenv . buildPlatform ) ''
78- substituteInPlace CMakeLists.txt \
79- --replace 'COMMAND prepare_builtins' 'COMMAND ${ buildLlvmTools . libclc . dev } /bin/prepare_builtins'
80- '' ;
77+ + lib . optionalString ( ! stdenv . buildPlatform . canExecute stdenv . hostPlatform ) (
78+ if ( lib . versionOlder release_version "19" ) then
79+ ''
80+ substituteInPlace CMakeLists.txt \
81+ --replace 'COMMAND prepare_builtins' \
82+ 'COMMAND ${ buildLlvmTools . libclc . dev } /bin/prepare_builtins'
83+ ''
84+ else
85+ ''
86+ substituteInPlace CMakeLists.txt \
87+ --replace-fail 'set( prepare_builtins_exe prepare_builtins )' \
88+ 'set( prepare_builtins_exe ${ buildLlvmTools . libclc . dev } /bin/prepare_builtins )'
89+ ''
90+ ) ;
8191
8292 nativeBuildInputs =
8393 [
You can’t perform that action at this time.
0 commit comments