summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-08-26 14:30:46 +0200
committerMichael Weiss <dev.primeos@gmail.com>2020-08-26 14:30:46 +0200
commit4a8262149139a9dee25a63a2d2c2888ede7d73dd (patch)
tree12439cce595bb0eb3b13f136df896f35fa880d25 /pkgs/development/compilers/llvm
parent64a2de1fc0c16b1a5ff9afe8c85aeb4dcfa019bb (diff)
downloadnixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar.gz
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar.bz2
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar.lz
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar.xz
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.tar.zst
nixpkgs-4a8262149139a9dee25a63a2d2c2888ede7d73dd.zip
llvm_11: Enable build-id when linking libLLVM shared libs
This is used by mesa.drivers (still on LLVM 9) as a cache key. I've
ported that change to LLVM 11 to test it and so that it doesn't get lost
in future versions. Credit for the change goes to David McFarland.
See #93946 for details.

Co-Authored-By: David McFarland <corngood@gmail.com>
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/11/llvm.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix
index 9cd0da4f4f9..f15a7d12b80 100644
--- a/pkgs/development/compilers/llvm/11/llvm.nix
+++ b/pkgs/development/compilers/llvm/11/llvm.nix
@@ -95,6 +95,9 @@ in stdenv.mkDerivation (rec {
     ln -sv $PWD/lib $out
   '';
 
+  # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+  LDFLAGS = optionalString enableSharedLibraries "-Wl,--build-id=sha1";
+
   cmakeFlags = with stdenv; [
     "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
     "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc