summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Galby <67924449+Jordan474@users.noreply.github.com>2021-08-27 13:16:26 +0200
committerGitHub <noreply@github.com>2021-08-27 13:16:26 +0200
commit97ea57e59f879bba15223d10ba57ff6d7dcca16b (patch)
tree361d4a0d7d5fab1db03d39bf344aedd4736c00a4
parentc152e558e948a53d5c206835a027194386c5eb8c (diff)
downloadspack-97ea57e59f879bba15223d10ba57ff6d7dcca16b.tar.gz
spack-97ea57e59f879bba15223d10ba57ff6d7dcca16b.tar.bz2
spack-97ea57e59f879bba15223d10ba57ff6d7dcca16b.tar.xz
spack-97ea57e59f879bba15223d10ba57ff6d7dcca16b.zip
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.
-rw-r--r--.gitignore1
-rwxr-xr-xlib/spack/env/cc2
l---------lib/spack/env/ld.gold1
l---------lib/spack/env/ld.lld1
4 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index c3d2670af4..c75b98089c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -132,6 +132,7 @@ celerybeat.pid
.env
.venv
env/
+!/lib/spack/env
venv/
ENV/
env.bak/
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 5157a5f381..2bcff42dfd 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -163,7 +163,7 @@ case "$command" in
lang_flags=F
debug_flags="-g"
;;
- ld)
+ ld|ld.gold|ld.lld)
mode=ld
;;
*)
diff --git a/lib/spack/env/ld.gold b/lib/spack/env/ld.gold
new file mode 120000
index 0000000000..2652f5f42c
--- /dev/null
+++ b/lib/spack/env/ld.gold
@@ -0,0 +1 @@
+cc \ No newline at end of file
diff --git a/lib/spack/env/ld.lld b/lib/spack/env/ld.lld
new file mode 120000
index 0000000000..2652f5f42c
--- /dev/null
+++ b/lib/spack/env/ld.lld
@@ -0,0 +1 @@
+cc \ No newline at end of file