diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-05-09 22:51:20 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-05-09 22:52:09 +0000 |
commit | 8629936f82aa573d967e5593636823342e2945b4 (patch) | |
tree | 0fc68f01d615b12a28c3a5820ef4e2e4671a90ee /pkgs/development/compilers/llvm/12/compiler-rt/default.nix | |
parent | 834c8e64629b02bb5076f0d4c8c80e5153a763f3 (diff) | |
download | nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar.gz nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar.bz2 nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar.lz nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar.xz nixpkgs-8629936f82aa573d967e5593636823342e2945b4.tar.zst nixpkgs-8629936f82aa573d967e5593636823342e2945b4.zip |
compiler-rt: Revert passing `COMPILER_RT_OS_DIR` and not symlinking libs
In 7869d1654517c028aa76fc1dedc9b5ac301a867a I got rid of the symlinking by forcing `COMPILER_RT_OS_DIR` to always be the empty string. I thought this was good because it just make compiler-rt be installed in a normal way. However, various LLVM tools expect the `COMPILER_RT_OS_DIR` to be set normally, and fail to find things when they aren't in the expected lib subdir. Maybe it would be best to patch that too in the long term, but for now we just undo this change.
Diffstat (limited to 'pkgs/development/compilers/llvm/12/compiler-rt/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/12/compiler-rt/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix index 7126deb8f0a..b880a0071b9 100644 --- a/pkgs/development/compilers/llvm/12/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/12/compiler-rt/default.nix @@ -21,7 +21,6 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DCOMPILER_RT_OS_DIR=" "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" @@ -84,7 +83,9 @@ stdenv.mkDerivation rec { ''; # Hack around weird upsream RPATH bug - postInstall = lib.optionalString (useLLVM) '' + postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) '' + ln -s "$out/lib"/*/* "$out/lib" + '' + lib.optionalString (useLLVM) '' ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o |