mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
Fix -fsanitize=... options for clang
When using -fsanitize=... options clang implicitly links binary to static libraries which are part of llvm, but expects them to be found under clang prefix
This commit is contained in:
parent
97a733ae57
commit
2780cf2838
@ -28,7 +28,11 @@ stdenv.mkDerivation {
|
||||
(stdenv.lib.optional (stdenv.gcc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}");
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
postInstall = "ln -sv ${llvm}/lib/LLVMgold.so $out/lib";
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
postInstall = ''
|
||||
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
|
||||
ln -sv ${llvm}/lib/clang/3.4/lib $out/lib/clang/3.4/
|
||||
'';
|
||||
|
||||
passthru.gcc = stdenv.gcc.gcc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user