about summary refs log tree commit diff
path: root/nixpkgs/pkgs
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-08-26 14:30:46 +0200
committerAlyssa Ross <hi@alyssa.is>2020-11-27 13:27:54 +0000
commit678667b74b81f63bcb134c16a7f49877b1b15073 (patch)
tree9b990b3b830e5094057c44e1d2b49695430b0739 /nixpkgs/pkgs
parent2f1b0858f7efce0fabfddb6af52bebc7e17726d8 (diff)
downloadnixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar.gz
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar.bz2
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar.lz
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar.xz
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.tar.zst
nixlib-678667b74b81f63bcb134c16a7f49877b1b15073.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>
(cherry picked from commit 4a8262149139a9dee25a63a2d2c2888ede7d73dd)
Diffstat (limited to 'nixpkgs/pkgs')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/11/llvm.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/11/llvm.nix
index 9cd0da4f4f99..f15a7d12b807 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/11/llvm.nix
+++ b/nixpkgs/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