summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Makefile1
-rw-r--r--llvm/test/lit.cfg5
-rw-r--r--llvm/test/lit.site.cfg.in1
-rw-r--r--llvm/test/tools/gold/alias.ll2
-rw-r--r--llvm/test/tools/gold/bad-alias.ll2
-rw-r--r--llvm/test/tools/gold/bcsection.ll2
-rw-r--r--llvm/test/tools/gold/coff.ll2
-rw-r--r--llvm/test/tools/gold/comdat.ll2
-rw-r--r--llvm/test/tools/gold/common.ll6
-rw-r--r--llvm/test/tools/gold/emit-llvm.ll6
-rw-r--r--llvm/test/tools/gold/invalid.ll2
-rw-r--r--llvm/test/tools/gold/linker-script.ll2
-rw-r--r--llvm/test/tools/gold/linkonce-weak.ll4
-rw-r--r--llvm/test/tools/gold/mtriple.ll2
-rw-r--r--llvm/test/tools/gold/no-map-whole-file.ll2
-rw-r--r--llvm/test/tools/gold/option.ll2
-rw-r--r--llvm/test/tools/gold/pr19901.ll2
-rw-r--r--llvm/test/tools/gold/slp-vectorize.ll2
-rw-r--r--llvm/test/tools/gold/stats.ll2
-rw-r--r--llvm/test/tools/gold/vectorize.ll2
-rw-r--r--llvm/test/tools/gold/weak.ll2
21 files changed, 28 insertions, 25 deletions
diff --git a/llvm/test/Makefile b/llvm/test/Makefile
index d9e90a3c8c3..9da22b20417 100644
--- a/llvm/test/Makefile
+++ b/llvm/test/Makefile
@@ -128,6 +128,7 @@ lit.site.cfg: FORCE
@$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=g >> lit.tmp
@$(ECHOPATH) s=@EXEEXT@=$(EXEEXT)=g >> lit.tmp
@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=$(PYTHON)=g >> lit.tmp
+ @$(ECHOPATH) s=@GOLD_EXECUTABLE@=ld=g >> lit.tmp
@$(ECHOPATH) s=@OCAMLFIND@=$(OCAMLFIND)=g >> lit.tmp
@$(ECHOPATH) s!@OCAMLFLAGS@!$(addprefix -cclib ,$(LDFLAGS))!g >> lit.tmp
@$(ECHOPATH) s=@HAVE_OCAMLOPT@=$(HAVE_OCAMLOPT)=g >> lit.tmp
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index 59d6aa29909..7b7a269b94b 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -187,6 +187,7 @@ if re.search(r'win32', config.target_triple):
config.substitutions.append( ('%llc_dwarf', llc_dwarf) )
# Add site-specific substitutions.
+config.substitutions.append( ('%gold', config.gold_executable) )
config.substitutions.append( ('%go', config.go_executable) )
config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
config.substitutions.append( ('%shlibext', config.llvm_shlib_ext) )
@@ -333,7 +334,7 @@ def have_ld_plugin_support():
if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
return False
- ld_cmd = subprocess.Popen(['ld', '--help'], stdout = subprocess.PIPE)
+ ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE)
ld_out = ld_cmd.stdout.read().decode()
ld_cmd.wait()
@@ -352,7 +353,7 @@ def have_ld_plugin_support():
if 'elf32ppc' not in emulations or 'elf_x86_64' not in emulations:
return False
- ld_version = subprocess.Popen(['ld', '--version'], stdout = subprocess.PIPE)
+ ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE)
if not 'GNU gold' in ld_version.stdout.read().decode():
return False
ld_version.wait()
diff --git a/llvm/test/lit.site.cfg.in b/llvm/test/lit.site.cfg.in
index 64ad0c39842..9336c76369a 100644
--- a/llvm/test/lit.site.cfg.in
+++ b/llvm/test/lit.site.cfg.in
@@ -13,6 +13,7 @@ config.llvm_shlib_ext = "@SHLIBEXT@"
config.llvm_exe_ext = "@EXEEXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.python_executable = "@PYTHON_EXECUTABLE@"
+config.gold_executable = "@GOLD_EXECUTABLE@"
config.ocamlfind_executable = "@OCAMLFIND@"
config.have_ocamlopt = "@HAVE_OCAMLOPT@"
config.have_ocaml_ounit = "@HAVE_OCAML_OUNIT@"
diff --git a/llvm/test/tools/gold/alias.ll b/llvm/test/tools/gold/alias.ll
index dbf3af57a7b..b4edb05a4e4 100644
--- a/llvm/test/tools/gold/alias.ll
+++ b/llvm/test/tools/gold/alias.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/alias-1.ll -o %t2.o
-; RUN: ld -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o \
+; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o \
; RUN: -plugin-opt=emit-llvm
; RUN: llvm-dis < %t3.o -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/bad-alias.ll b/llvm/test/tools/gold/bad-alias.ll
index e0fc788a612..a98bf710b45 100644
--- a/llvm/test/tools/gold/bad-alias.ll
+++ b/llvm/test/tools/gold/bad-alias.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
-; RUN: not ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t.o -o %t2.o 2>&1 | FileCheck %s
diff --git a/llvm/test/tools/gold/bcsection.ll b/llvm/test/tools/gold/bcsection.ll
index 8565d9ddc4c..37d2994cc78 100644
--- a/llvm/test/tools/gold/bcsection.ll
+++ b/llvm/test/tools/gold/bcsection.ll
@@ -2,7 +2,7 @@
; RUN: llvm-mc -I=%T -filetype=obj -o %T/bcsection.bco %p/Inputs/bcsection.s
; RUN: llvm-nm -no-llvm-bc %T/bcsection.bco | count 0
-; RUN: ld -r -o %T/bcsection.o -plugin %llvmshlibdir/LLVMgold.so %T/bcsection.bco
+; RUN: %gold -r -o %T/bcsection.o -plugin %llvmshlibdir/LLVMgold.so %T/bcsection.bco
; RUN: llvm-nm -no-llvm-bc %T/bcsection.o | FileCheck %s
; CHECK: main
diff --git a/llvm/test/tools/gold/coff.ll b/llvm/test/tools/gold/coff.ll
index b66f028a14d..5d8a1c9da5f 100644
--- a/llvm/test/tools/gold/coff.ll
+++ b/llvm/test/tools/gold/coff.ll
@@ -1,5 +1,5 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=emit-llvm \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=emit-llvm \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/comdat.ll b/llvm/test/tools/gold/comdat.ll
index 2edd7822c91..370bf5641f3 100644
--- a/llvm/test/tools/gold/comdat.ll
+++ b/llvm/test/tools/gold/comdat.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o
-; RUN: ld -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t.o %t2.o \
+; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t.o %t2.o \
; RUN: -plugin-opt=emit-llvm
; RUN: llvm-dis %t3.o -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/common.ll b/llvm/test/tools/gold/common.ll
index f3092310a1d..ef18e683104 100644
--- a/llvm/test/tools/gold/common.ll
+++ b/llvm/test/tools/gold/common.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as %s -o %t1.o
; RUN: llvm-as %p/Inputs/common.ll -o %t2.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t1.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck %s
@@ -11,7 +11,7 @@
; Shared library case, we merge @a as common and keep it for the symbol table.
; CHECK: @a = common global i16 0, align 8
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: %t1.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=EXEC %s
@@ -20,7 +20,7 @@
; EXEC: @a = internal global i16 0, align 8
; RUN: llc %p/Inputs/common.ll -o %t2.o -filetype=obj
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: %t1.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck --check-prefix=MIXED %s
diff --git a/llvm/test/tools/gold/emit-llvm.ll b/llvm/test/tools/gold/emit-llvm.ll
index 2c43147a2ea..f851fbfb5e0 100644
--- a/llvm/test/tools/gold/emit-llvm.ll
+++ b/llvm/test/tools/gold/emit-llvm.ll
@@ -1,20 +1,20 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: --plugin-opt=generate-api-file \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o -o - | FileCheck %s
; RUN: FileCheck --check-prefix=API %s < %T/../apifile.txt
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: -m elf_x86_64 --plugin-opt=save-temps \
; RUN: -shared %t.o -o %t3.o
; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s
; RUN: llvm-dis %t3.o.opt.bc -o - | FileCheck --check-prefix=OPT %s
; RUN: rm -f %t4.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: -m elf_x86_64 --plugin-opt=disable-output \
; RUN: -shared %t.o -o %t4.o
; RUN: not test -a %t4.o
diff --git a/llvm/test/tools/gold/invalid.ll b/llvm/test/tools/gold/invalid.ll
index 8db76446a3d..858cd47adbe 100644
--- a/llvm/test/tools/gold/invalid.ll
+++ b/llvm/test/tools/gold/invalid.ll
@@ -1,4 +1,4 @@
-; RUN: not ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: %p/Inputs/invalid.bc -o %t2 2>&1 | FileCheck %s
; test that only one error gets printed
diff --git a/llvm/test/tools/gold/linker-script.ll b/llvm/test/tools/gold/linker-script.ll
index 35a769453e5..7c88b0ffd5f 100644
--- a/llvm/test/tools/gold/linker-script.ll
+++ b/llvm/test/tools/gold/linker-script.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t.o -o %t2.o \
; RUN: -version-script=%p/Inputs/linker-script.export
diff --git a/llvm/test/tools/gold/linkonce-weak.ll b/llvm/test/tools/gold/linkonce-weak.ll
index 765275b09d5..a0cccea56cf 100644
--- a/llvm/test/tools/gold/linkonce-weak.ll
+++ b/llvm/test/tools/gold/linkonce-weak.ll
@@ -1,12 +1,12 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/linkonce-weak.ll -o %t2.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck %s
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t2.o %t.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/mtriple.ll b/llvm/test/tools/gold/mtriple.ll
index 6395af6f1ab..94211ed299d 100644
--- a/llvm/test/tools/gold/mtriple.ll
+++ b/llvm/test/tools/gold/mtriple.ll
@@ -1,5 +1,5 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -m elf32ppc \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -m elf32ppc \
; RUN: -plugin-opt=mtriple=powerpc-linux-gnu \
; RUN: -plugin-opt=obj-path=%t3.o \
; RUN: -shared %t.o -o %t2
diff --git a/llvm/test/tools/gold/no-map-whole-file.ll b/llvm/test/tools/gold/no-map-whole-file.ll
index 21a0c46d28b..4c261d70a24 100644
--- a/llvm/test/tools/gold/no-map-whole-file.ll
+++ b/llvm/test/tools/gold/no-map-whole-file.ll
@@ -1,5 +1,5 @@
; RUN: llvm-as -o %t.bc %s
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=emit-llvm \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -plugin-opt=emit-llvm \
; RUN: --no-map-whole-files -r -o %t2.bc %t.bc
; RUN: llvm-dis < %t2.bc -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/option.ll b/llvm/test/tools/gold/option.ll
index 8154e435b4e..59e3f1ee4aa 100644
--- a/llvm/test/tools/gold/option.ll
+++ b/llvm/test/tools/gold/option.ll
@@ -1,5 +1,5 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -m elf_x86_64 \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -m elf_x86_64 \
; RUN: --plugin-opt=-jump-table-type=arity \
; RUN: --plugin-opt=-mattr=+aes \
; RUN: --plugin-opt=mcpu=core-avx2 \
diff --git a/llvm/test/tools/gold/pr19901.ll b/llvm/test/tools/gold/pr19901.ll
index 304246bca47..72c54ab9c96 100644
--- a/llvm/test/tools/gold/pr19901.ll
+++ b/llvm/test/tools/gold/pr19901.ll
@@ -1,6 +1,6 @@
; RUN: llc %s -o %t.o -filetype=obj -relocation-model=pic
; RUN: llvm-as %p/Inputs/pr19901-1.ll -o %t2.o
-; RUN: ld -shared -o %t.so -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o
+; RUN: %gold -shared -o %t.so -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o
; RUN: llvm-readobj -t %t.so | FileCheck %s
; CHECK: Symbol {
diff --git a/llvm/test/tools/gold/slp-vectorize.ll b/llvm/test/tools/gold/slp-vectorize.ll
index d378902e32f..d39aa768364 100644
--- a/llvm/test/tools/gold/slp-vectorize.ll
+++ b/llvm/test/tools/gold/slp-vectorize.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=save-temps \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/stats.ll b/llvm/test/tools/gold/stats.ll
index 7c353e6ab2a..b3c829798df 100644
--- a/llvm/test/tools/gold/stats.ll
+++ b/llvm/test/tools/gold/stats.ll
@@ -1,7 +1,7 @@
; REQUIRES: asserts
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -shared \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -shared \
; RUN: -plugin-opt=-stats %t.o -o %t2 2>&1 | FileCheck %s
; CHECK: Statistics Collected
diff --git a/llvm/test/tools/gold/vectorize.ll b/llvm/test/tools/gold/vectorize.ll
index 3d305db1e31..c1626d7afcd 100644
--- a/llvm/test/tools/gold/vectorize.ll
+++ b/llvm/test/tools/gold/vectorize.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as %s -o %t.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=save-temps \
; RUN: -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o.opt.bc -o - | FileCheck %s
diff --git a/llvm/test/tools/gold/weak.ll b/llvm/test/tools/gold/weak.ll
index e05e905cc14..6d8d7a871f1 100644
--- a/llvm/test/tools/gold/weak.ll
+++ b/llvm/test/tools/gold/weak.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/weak.ll -o %t2.o
-; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN: --plugin-opt=emit-llvm \
; RUN: -shared %t.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck %s
OpenPOWER on IntegriCloud