1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

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:
TredwellGit 2020-10-11 08:42:56 -04:00 committed by GitHub
parent 3568e17510
commit 03dd1b355b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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