[lld] [lld][WebAssembly] -r: force -Bstatic (PR #108264)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 11:16:43 PDT 2024


================
@@ -93,6 +93,12 @@
 // RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -call_shared -lls
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
 
+/// -r implies -Bstatic and has precedence over -Bdynamic.
+// RUN: ld.lld -r -Bdynamic %t.o -L%t.dir -lls -o %t3.ro
+// RUN: llvm-readelf -s -h %t3.ro | FileCheck --check-prefix=RELOCATABLE %s
+// RELOCATABLE: Type: REL
+// RELOCATABLE: [[#]] _static
----------------
sbc100 wrote:

Oops, I didn't mean to send this for review until I'd finished porting this test fragment.

https://github.com/llvm/llvm-project/pull/108264


More information about the llvm-commits mailing list