mkDerivation: do not disable separateDebugInfo on LLVM stdenvs

This was disabled here: b86e62d30d (diff-282a02cc3871874f16401347d8fadc90d59d7ab11f6a99eaa5173c3867e1a160)

h/t to @teh: b86e62d30d (commitcomment-77916294)
for pointing out that the failure that @matthewbauer was
seeing was caused by the `separate-debug-info.sh` `build-id` length
requirement that #146275 will relax

`lld` has had `--build-id` support dating back to LLVM4: https://reviews.llvm.org/D18091

This predates every `llvmPackages_` version currently in nixpkgs (and
certainly every version actually still used in `useLLVM` stdenvs) so
with the previous commit (asking `ld` for sufficiently long SHA1 hashes)
I think we can safely enable `separateDebugInfo` when using LLVM
bintools.
This commit is contained in:
Rahul Butani 2023-02-25 12:18:00 -06:00
parent b41933a1be
commit d364ee8d13
No known key found for this signature in database

View File

@ -171,7 +171,7 @@ let
doCheck' = doCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
doInstallCheck' = doInstallCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux && !(stdenv.hostPlatform.useLLVM or false);
separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux;
outputs' = outputs ++ lib.optional separateDebugInfo' "debug";
# Turn a derivation into its outPath without a string context attached.