From 678667b74b81f63bcb134c16a7f49877b1b15073 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 14:30:46 +0200 Subject: 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 (cherry picked from commit 4a8262149139a9dee25a63a2d2c2888ede7d73dd) --- nixpkgs/pkgs/development/compilers/llvm/11/llvm.nix | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit 1.4.1