llvm_11: link to the llvm compiler-rt share directory from the wrapper (#100190)
A port of #85925 for LLVM 11 to enable CFI for Chromium. This is required for features such as `-fsanitize=cfi` that (by default) load the file `…/resource-root/share/cfi_blacklist.txt`.
This commit is contained in:
parent
3568e17510
commit
03dd1b355b
@ -24,6 +24,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
Block a user