llvm_10: link to the llvm compiler-rt share directory from the wrapper
This is required for features such as `-fsanitze=cfi` that (by default) load the file `…/resource-root/share/cfi_blacklist.txt`.
This commit is contained in:
parent
920c51e408
commit
d17650b654
|
@ -23,6 +23,7 @@ let
|
|||
mkdir "$rsrc"
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
|
|
Loading…
Reference in New Issue