[llvm-branch-commits] [llvm] 93da37d - [test] Fix tools/gold/X86/comdat-nodeduplicate.ll on non-X86 hosts

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 4 19:43:53 PDT 2021


Author: Nathan Chancellor
Date: 2021-08-04T19:43:41-07:00
New Revision: 93da37dc58e9d1d4a685bcb6a30a9d3ff78733f9

URL: https://github.com/llvm/llvm-project/commit/93da37dc58e9d1d4a685bcb6a30a9d3ff78733f9
DIFF: https://github.com/llvm/llvm-project/commit/93da37dc58e9d1d4a685bcb6a30a9d3ff78733f9.diff

LOG: [test] Fix tools/gold/X86/comdat-nodeduplicate.ll on non-X86 hosts

When running this test on an aarch64 machine, it fails:

```
/usr/bin/ld.gold: error: .../test/tools/gold/X86/Output/comdat-nodeduplicate.ll.tmp/ab.lto.o: incompatible target
```

Specify the elf_x86_64 emulation as all of the other gold plugin tests
do.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107020

(cherry picked from commit 5060224d9eed8b8359ed5090bb7c577b8575e9e7)

Added: 
    

Modified: 
    llvm/test/tools/gold/X86/comdat-nodeduplicate.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll b/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
index 11d04d2aab1f..c27d91a1d437 100644
--- a/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
+++ b/llvm/test/tools/gold/X86/comdat-nodeduplicate.ll
@@ -8,7 +8,7 @@
 ; RUN: llvm-as %t/b.ll -o %t/b.bc
 ; RUN: llvm-as %t/c.ll -o %t/c.bc
 
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext --plugin-opt=save-temps \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext --plugin-opt=save-temps \
 ; RUN:   -u foo %t/a.bc --start-lib %t/b.bc --end-lib -o %t/ab
 
 ; RUN: FileCheck %s --check-prefix=RESOL_AB < %t/ab.resolution.txt
@@ -20,7 +20,7 @@
 ; DATA: 0x[[#%x,]] 01000000 00000000  ........
 
 ;; __profc_foo from c.bc is non-prevailing and thus discarded.
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext --plugin-opt=save-temps \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext --plugin-opt=save-temps \
 ; RUN:   -u foo -u c %t/a.bc --start-lib %t/b.bc %t/c.bc --end-lib -o %t/abc
 ; RUN: FileCheck %s --check-prefix=RESOL_ABC < %t/abc.resolution.txt
 ; RUN: llvm-readelf -x .data %t/abc | FileCheck %s --check-prefix=DATA
@@ -35,7 +35,7 @@
 ; RUN: opt --module-summary %t/b.ll -o %t/b.bc
 ; RUN: opt --module-summary %t/c.ll -o %t/c.bc
 
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
 ; RUN:   -u foo %t/a.bc --start-lib %t/b.bc %t/c.bc --end-lib -o %t/abc
 ; RUN: llvm-readelf -x .data %t/abc | FileCheck %s --check-prefix=DATA
 


        


More information about the llvm-branch-commits mailing list