Add ld.gold and ld.lld compiler wrapper (#25626)

The gcc compiler can be configured to use `ld.gold` by default. It will
then call `ld.gold` explicitly when linking. When so, spack need to have
a ld.gold wrapper in PATH to inject rpaths link flags etc...

Also I wouldn't be surprised to see some package calling `ld.gold`
directly.

As for ld.gold, the argument could be made that we want to support any
package that could call ld.lld.
This commit is contained in:
Jordan Galby 2021-08-27 13:16:26 +02:00 committed by GitHub
parent c152e558e9
commit 97ea57e59f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View file

@ -132,6 +132,7 @@ celerybeat.pid
.env
.venv
env/
!/lib/spack/env
venv/
ENV/
env.bak/

2
lib/spack/env/cc vendored
View file

@ -163,7 +163,7 @@ case "$command" in
lang_flags=F
debug_flags="-g"
;;
ld)
ld|ld.gold|ld.lld)
mode=ld
;;
*)

1
lib/spack/env/ld.gold vendored Symbolic link
View file

@ -0,0 +1 @@
cc

1
lib/spack/env/ld.lld vendored Symbolic link
View file

@ -0,0 +1 @@
cc