[clang] [lld] [lld][WebAssembly] Remove the experimental warning for PIC/dynamic linking (PR #196566)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 09:12:47 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld
Author: Sam Clegg (sbc100)
<details>
<summary>Changes</summary>
The current dynamic linking support has been used for several years not both in emscripten and in wasi-sdk and is documented https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md. We did/do have have plans to develop another version of the dynamic linking ABI that doesn't use a global symbol namespace, and that can still happen, but the current API is clearly production worthy regardless of future plans.
This change removes the linker warning and the corresponding `--experimental-pic` flag.
If we do want to still make breaking changes to the dylink format we can rename the `dylink.1` section (which already contains a version number).
This change is leads the way for enabling shared libraries by default in emscripten.
---
Patch is 39.42 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/196566.diff
39 Files Affected:
- (modified) clang/lib/Interpreter/Wasm.cpp (-1)
- (modified) lld/docs/WebAssembly.rst (+1-3)
- (modified) lld/test/wasm/bad-data-relocs.s (+1-1)
- (modified) lld/test/wasm/bsymbolic.s (+2-2)
- (modified) lld/test/wasm/compact-imports.s (+1-1)
- (modified) lld/test/wasm/data-segments.ll (+3-3)
- (modified) lld/test/wasm/dylink-non-pie.s (+1-1)
- (modified) lld/test/wasm/dylink.s (+6-6)
- (modified) lld/test/wasm/global-base.test (+2-2)
- (modified) lld/test/wasm/libsearch.s (+14-14)
- (modified) lld/test/wasm/lto/pic-empty.s (+1-1)
- (modified) lld/test/wasm/lto/relocation-model.ll (+1-1)
- (modified) lld/test/wasm/no-shlib-sigcheck.s (+5-5)
- (modified) lld/test/wasm/pie.s (+3-3)
- (modified) lld/test/wasm/rpath.s (+1-1)
- (modified) lld/test/wasm/runtime-relocations-himem.s (+1-1)
- (modified) lld/test/wasm/shared-export-dynamic.s (+2-2)
- (modified) lld/test/wasm/shared-lazy.s (+6-6)
- (modified) lld/test/wasm/shared-memory-bss.s (+1-1)
- (modified) lld/test/wasm/shared-needed.s (+3-3)
- (modified) lld/test/wasm/shared-weak-symbols.s (+1-1)
- (modified) lld/test/wasm/shared-weak-undefined.s (+2-2)
- (modified) lld/test/wasm/shared.s (+1-1)
- (modified) lld/test/wasm/shared64.s (+1-1)
- (modified) lld/test/wasm/static-error.s (+2-2)
- (modified) lld/test/wasm/tag-section.ll (+1-1)
- (modified) lld/test/wasm/tls-export.s (+1-1)
- (modified) lld/test/wasm/tls-non-shared-memory-basic.s (+1-1)
- (modified) lld/test/wasm/tls-non-shared-memory.s (+3-3)
- (modified) lld/test/wasm/tls-relocations.s (+1-1)
- (modified) lld/test/wasm/undef-shared.s (+1-1)
- (modified) lld/test/wasm/undefined-data.s (+1-1)
- (modified) lld/test/wasm/unresolved-symbols.s (+1-1)
- (modified) lld/test/wasm/unsupported-pic-relocations.s (+6-6)
- (modified) lld/test/wasm/unsupported-pic-relocations64.s (+6-6)
- (modified) lld/test/wasm/weak-undefined-pic.s (+1-1)
- (modified) lld/wasm/Config.h (+3-3)
- (modified) lld/wasm/Driver.cpp (-23)
- (modified) lld/wasm/Options.td (+2-2)
``````````diff
diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp
index 007227c73dc5f..96600cf9fa6d0 100644
--- a/clang/lib/Interpreter/Wasm.cpp
+++ b/clang/lib/Interpreter/Wasm.cpp
@@ -120,7 +120,6 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) {
std::vector<const char *> LinkerArgs = {"wasm-ld",
"-shared",
"--import-memory",
- "--experimental-pic",
"--stack-first",
"--allow-undefined",
ObjectFileName.c_str(),
diff --git a/lld/docs/WebAssembly.rst b/lld/docs/WebAssembly.rst
index a7e1bc4cbe97b..389fc0ac25553 100644
--- a/lld/docs/WebAssembly.rst
+++ b/lld/docs/WebAssembly.rst
@@ -108,9 +108,7 @@ WebAssembly-specific options:
this means inputs should be compiled with `-fPIC` (i.e. `pic` or
`dynamic-no-pic` relocation models). This options is useful for linking
binaries that are themselves static (non-relocatable) but whose undefined
- symbols are resolved by a dynamic linker. Since the dynamic linking API is
- experimental, this option currently requires `--experimental-pic` to also
- be specified.
+ symbols are resolved by a dynamic linker.
.. option:: --import-memory
diff --git a/lld/test/wasm/bad-data-relocs.s b/lld/test/wasm/bad-data-relocs.s
index 7e2ef3e1dc3b7..6e95c5bf58ac1 100644
--- a/lld/test/wasm/bad-data-relocs.s
+++ b/lld/test/wasm/bad-data-relocs.s
@@ -2,7 +2,7 @@
## generated in `-shared/`-pie` binaries.
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
-# RUN: not wasm-ld -pie --experimental-pic %t.o -o %t.wasm 2>&1 | FileCheck %s
+# RUN: not wasm-ld -pie %t.o -o %t.wasm 2>&1 | FileCheck %s
# CHECK: wasm-ld: error: invalid runtime relocation type in data section: R_WASM_FUNCTION_INDEX_I32
diff --git a/lld/test/wasm/bsymbolic.s b/lld/test/wasm/bsymbolic.s
index 872fb1b53486b..f22a916b24b32 100644
--- a/lld/test/wasm/bsymbolic.s
+++ b/lld/test/wasm/bsymbolic.s
@@ -2,10 +2,10 @@
// RUN: wasm-ld --no-entry -Bsymbolic %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=WARNING %s
// WARNING: warning: -Bsymbolic is only meaningful when combined with -shared
-// RUN: wasm-ld --experimental-pic -shared %t.o -o %t0.so
+// RUN: wasm-ld -shared %t.o -o %t0.so
// RUN: obj2yaml %t0.so | FileCheck -check-prefix=NOOPTION %s
-// RUN: wasm-ld --experimental-pic -shared -Bsymbolic %t.o -o %t1.so
+// RUN: wasm-ld -shared -Bsymbolic %t.o -o %t1.so
// RUN: obj2yaml %t1.so | FileCheck -check-prefix=SYMBOLIC %s
// NOOPTION: - Type: IMPORT
diff --git a/lld/test/wasm/compact-imports.s b/lld/test/wasm/compact-imports.s
index 4c6ddc2456962..7c7ed198f57d4 100644
--- a/lld/test/wasm/compact-imports.s
+++ b/lld/test/wasm/compact-imports.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
-# RUN: wasm-ld --experimental-pic --unresolved-symbols=import-dynamic %t.o -o %t.wasm
+# RUN: wasm-ld --unresolved-symbols=import-dynamic %t.o -o %t.wasm
.functype foo () -> ()
.functype bar () -> ()
diff --git a/lld/test/wasm/data-segments.ll b/lld/test/wasm/data-segments.ll
index 237f4285e3763..7a18fd5efb655 100644
--- a/lld/test/wasm/data-segments.ll
+++ b/lld/test/wasm/data-segments.ll
@@ -18,7 +18,7 @@
; RUN: obj2yaml %t.bulk-mem64.wasm | FileCheck %s --check-prefixes ACTIVE,ACTIVE64
;; In -pie mode segments are combined into one active segment.
-; RUN: wasm-ld --experimental-pic --import-memory -pie -no-gc-sections --no-entry %t.atomics.bulk-mem.pic.o -o %t.pic.wasm
+; RUN: wasm-ld --import-memory -pie -no-gc-sections --no-entry %t.atomics.bulk-mem.pic.o -o %t.pic.wasm
; RUN: obj2yaml %t.pic.wasm | FileCheck %s --check-prefixes ACTIVE-PIC
; RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_init_memory --no-show-raw-insn --no-leading-addr %t.pic.wasm | FileCheck %s --check-prefixes PIC-NON-SHARED-DIS
@@ -33,12 +33,12 @@
; RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_init_memory --no-show-raw-insn --no-leading-addr %t.atomics.bulk-mem64.wasm | FileCheck %s --check-prefixes DIS,NOPIC-DIS -DPTR=i64
;; Also test in combination with PIC/pie
-; RUN: wasm-ld --experimental-pic -pie -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.bulk-mem.pic.o -o %t.shared.pic.wasm
+; RUN: wasm-ld -pie -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.bulk-mem.pic.o -o %t.shared.pic.wasm
; RUN: obj2yaml %t.shared.pic.wasm | FileCheck %s --check-prefixes PASSIVE-PIC,PASSIVE32-PIC
; RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_init_memory --no-show-raw-insn --no-leading-addr %t.shared.pic.wasm | FileCheck %s --check-prefixes DIS,PIC-DIS -DPTR=i32
;; Also test in combination with PIC/pie + wasm64
-; RUN: wasm-ld -mwasm64 --experimental-pic -pie -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.bulk-mem.pic-mem64.o -o %t.pic-mem64.wasm
+; RUN: wasm-ld -mwasm64 -pie -no-gc-sections --no-entry --shared-memory --max-memory=131072 %t.atomics.bulk-mem.pic-mem64.o -o %t.pic-mem64.wasm
; RUN: obj2yaml %t.pic-mem64.wasm | FileCheck %s --check-prefixes PASSIVE-PIC,PASSIVE64-PIC
; RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_init_memory --no-show-raw-insn --no-leading-addr %t.pic-mem64.wasm | FileCheck %s --check-prefixes DIS,PIC-DIS -DPTR=i64
diff --git a/lld/test/wasm/dylink-non-pie.s b/lld/test/wasm/dylink-non-pie.s
index fddfddb4df658..1dceaeb9c9fce 100755
--- a/lld/test/wasm/dylink-non-pie.s
+++ b/lld/test/wasm/dylink-non-pie.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.lib.o %p/Inputs/ret32.s
-# RUN: wasm-ld -m wasm32 --experimental-pic -shared --no-entry %t.lib.o -o %t.lib.so
+# RUN: wasm-ld -m wasm32 -shared --no-entry %t.lib.o -o %t.lib.so
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
# RUN: wasm-ld -m wasm32 -Bdynamic %t.o %t.lib.so -o %t.wasm
# RUN: obj2yaml %t.wasm | FileCheck %s
diff --git a/lld/test/wasm/dylink.s b/lld/test/wasm/dylink.s
index d40778c3b2d6f..d129f9032a2d2 100644
--- a/lld/test/wasm/dylink.s
+++ b/lld/test/wasm/dylink.s
@@ -1,9 +1,9 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten -mattr=+exception-handling -o %t.o %s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %p/Inputs/ret32.s -o %t.ret32.o
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %p/Inputs/libsearch-dyn.s -o %t.dyn.o
-# RUN: wasm-ld --experimental-pic -shared %t.ret32.o %t.dyn.o -o %t.lib.so
-# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
-# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so
+# RUN: wasm-ld -shared %t.ret32.o %t.dyn.o -o %t.lib.so
+# RUN: not wasm-ld -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
+# RUN: wasm-ld -pie -o %t.wasm %t.o %t.lib.so
# RUN: obj2yaml %t.wasm | FileCheck %s
# Same again for wasm64
@@ -11,9 +11,9 @@
# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten -mattr=+exception-handling -o %t.o %s
# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten %p/Inputs/ret32.s -o %t.ret32.o
# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten %p/Inputs/libsearch-dyn.s -o %t.dyn.o
-# RUN: wasm-ld --experimental-pic -mwasm64 -shared %t.ret32.o %t.dyn.o -o %t.lib.so
-# RUN: not wasm-ld --experimental-pic -mwasm64 -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
-# RUN: wasm-ld --experimental-pic -mwasm64 -pie -o %t.wasm %t.o %t.lib.so
+# RUN: wasm-ld -mwasm64 -shared %t.ret32.o %t.dyn.o -o %t.lib.so
+# RUN: not wasm-ld -mwasm64 -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
+# RUN: wasm-ld -mwasm64 -pie -o %t.wasm %t.o %t.lib.so
# RUN: obj2yaml %t.wasm | FileCheck %s
# ERROR: error: {{.*}}: undefined symbol: ret32
diff --git a/lld/test/wasm/global-base.test b/lld/test/wasm/global-base.test
index e84b8ec3ef9ce..d94446a7638bf 100644
--- a/lld/test/wasm/global-base.test
+++ b/lld/test/wasm/global-base.test
@@ -1,8 +1,8 @@
RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.o
# Check for error on `--global-base` with `-shared` and `-pie`
-RUN: not wasm-ld --global-base=2048 --experimental-pic -shared -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=SHARED-ERROR
-RUN: not wasm-ld --global-base=2048 --experimental-pic -pie -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=SHARED-ERROR
+RUN: not wasm-ld --global-base=2048 -shared -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=SHARED-ERROR
+RUN: not wasm-ld --global-base=2048 -pie -o %t.wasm %t.o 2>&1 | FileCheck %s -check-prefix=SHARED-ERROR
SHARED-ERROR: error: --global-base may not be used with -shared/-pie
# Check for error on `--global-base` which is lower than that end of the stack
diff --git a/lld/test/wasm/libsearch.s b/lld/test/wasm/libsearch.s
index 20f1e9b2bfa3f..f22d450242136 100644
--- a/lld/test/wasm/libsearch.s
+++ b/lld/test/wasm/libsearch.s
@@ -8,7 +8,7 @@
// RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown \
// RUN: %p/Inputs/use-bar.s -o %tbar.o
// RUN: mkdir -p %t.dir
-// RUN: wasm-ld -shared --experimental-pic %tdyn.o -o %t.dir/libls.so
+// RUN: wasm-ld -shared %tdyn.o -o %t.dir/libls.so
// RUN: cp -f %t.dir/libls.so %t.dir/libls2.so
// RUN: rm -f %t.dir/libls.a
// RUN: llvm-ar rcs %t.dir/libls.a %tst.o
@@ -38,7 +38,7 @@
// STATIC: Name: _static
// Should use explicitly specified dynamic library
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -l:libls.so
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -l:libls.so
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
// DYNAMIC: Symbols [
// DYNAMIC-NOT: Name: _static
@@ -48,13 +48,13 @@
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
// Should prefer dynamic when linking PIE.
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
// Check for library search order
// RUN: mkdir -p %t.dir2
// RUN: cp %t.dir/libls.a %t.dir2
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir2 -L%t.dir -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir2 -L%t.dir -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
// -L can be placed after -l
@@ -65,32 +65,32 @@
// RUN: wasm-ld --emit-relocs --no-gc-sections -o %t3 %t.o --library-path %t.dir --library ls
// Should not search for dynamic libraries if -Bstatic is specified
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: not wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o /dev/null %t.o -L%t.dir -Bstatic -lls2 2>&1 \
+// RUN: not wasm-ld -pie --emit-relocs --no-gc-sections -o /dev/null %t.o -L%t.dir -Bstatic -lls2 2>&1 \
// RUN: | FileCheck --check-prefix=NOLIB2 %s
// NOLIB2: unable to find library -lls2
// -Bdynamic should restore default behaviour
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -Bdynamic -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -Bdynamic -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
// -Bstatic and -Bdynamic should affect only libraries which follow them
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -lls -Bstatic -Bdynamic
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -lls -Bstatic -Bdynamic
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -lls -Bdynamic
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -lls -Bdynamic
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
// Check aliases as well
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -dn -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -dn -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -non_shared -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -non_shared -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -static -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -static -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -dy -lls
+// RUN: wasm-ld -pie --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -dy -lls
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
-// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -call_shared -lls
+// RUN: wasm-ld -pie --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.
diff --git a/lld/test/wasm/lto/pic-empty.s b/lld/test/wasm/lto/pic-empty.s
index 4fe4dffda1dcb..9b09e539583f2 100644
--- a/lld/test/wasm/lto/pic-empty.s
+++ b/lld/test/wasm/lto/pic-empty.s
@@ -6,7 +6,7 @@
; See https://github.com/llvm/llvm-project/issues/51681.
; RUN: llvm-as %s -o %t.o
-; RUN: wasm-ld --lto-O2 --experimental-pic -shared --no-gc-sections --export=tls_int %t.o -o %t.so
+; RUN: wasm-ld --lto-O2 -shared --no-gc-sections --export=tls_int %t.o -o %t.so
; RUN: obj2yaml %t.so | FileCheck %s
target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20"
diff --git a/lld/test/wasm/lto/relocation-model.ll b/lld/test/wasm/lto/relocation-model.ll
index a042615b8fe1c..d783973d107ba 100644
--- a/lld/test/wasm/lto/relocation-model.ll
+++ b/lld/test/wasm/lto/relocation-model.ll
@@ -10,7 +10,7 @@
;; Linking with --unresolved-symbols=import-dynamic should also generate PIC
;; code for external references.
-; RUN: wasm-ld %t.o -o %t_import.wasm -save-temps --experimental-pic --unresolved-symbols=import-dynamic
+; RUN: wasm-ld %t.o -o %t_import.wasm -save-temps --unresolved-symbols=import-dynamic
; RUN: llvm-readobj -r %t_import.wasm.lto.o | FileCheck %s --check-prefix=PIC
; PIC: R_WASM_GLOBAL_INDEX_LEB foo
diff --git a/lld/test/wasm/no-shlib-sigcheck.s b/lld/test/wasm/no-shlib-sigcheck.s
index 13f2a2132ac7c..951a6df8471fe 100644
--- a/lld/test/wasm/no-shlib-sigcheck.s
+++ b/lld/test/wasm/no-shlib-sigcheck.s
@@ -1,17 +1,17 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten -o %t.o %s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %p/Inputs/ret32.s -o %t.ret32.o
-# RUN: wasm-ld --experimental-pic -shared %t.ret32.o -o %t.lib.so
+# RUN: wasm-ld -shared %t.ret32.o -o %t.lib.so
## Fails with signature mismatch by default
-# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so 2>&1 | FileCheck --check-prefix=ERROR %s
+# RUN: not wasm-ld -pie -o %t.wasm %t.o %t.lib.so 2>&1 | FileCheck --check-prefix=ERROR %s
## Same again with shared library first.
-# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.lib.so %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
+# RUN: not wasm-ld -pie -o %t.wasm %t.lib.so %t.o 2>&1 | FileCheck --check-prefix=ERROR %s
## Succeeds with --no-shlib-sigcheck added
-# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so --no-shlib-sigcheck
+# RUN: wasm-ld -pie -o %t.wasm %t.o %t.lib.so --no-shlib-sigcheck
# RUN: obj2yaml %t.wasm | FileCheck %s
## Same again with shared library first.
-# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.lib.so %t.o --no-shlib-sigcheck
+# RUN: wasm-ld -pie -o %t.wasm %t.lib.so %t.o --no-shlib-sigcheck
# RUN: obj2yaml %t.wasm | FileCheck %s
.functype ret32 (f32) -> (i64)
diff --git a/lld/test/wasm/pie.s b/lld/test/wasm/pie.s
index 21eac79207318..a86f50f04ce16 100644
--- a/lld/test/wasm/pie.s
+++ b/lld/test/wasm/pie.s
@@ -1,6 +1,6 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten -o %t.o %s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %S/Inputs/internal_func.s -o %t.internal_func.o
-# RUN: wasm-ld --no-gc-sections --experimental-pic -pie --unresolved-symbols=import-dynamic -o %t.wasm %t.o %t.internal_func.o
+# RUN: wasm-ld --no-gc-sections -pie --unresolved-symbols=import-dynamic -o %t.wasm %t.o %t.internal_func.o
# RUN: obj2yaml %t.wasm | FileCheck %s
# RUN: llvm-objdump --disassemble-symbols=__wasm_call_ctors,__wasm_apply_data_relocs --no-show-raw-insn --no-leading-addr %t.wasm | FileCheck %s --check-prefixes DISASSEM
@@ -150,7 +150,7 @@ _start:
# instruction in the InitExpr. We also, therefore, do not need these globals
# to be mutable.
-# RUN: wasm-ld --no-gc-sections --experimental-pic -pie --unresolved-symbols=import-dynamic --extra-features=extended-const -o %t.extended.wasm %t.o %t.internal_func.o
+# RUN: wasm-ld --no-gc-sections -pie --unresolved-symbols=import-dynamic --extra-features=extended-const -o %t.extended.wasm %t.o %t.internal_func.o
# RUN: obj2yaml %t.extended.wasm | FileCheck %s --check-prefix=EXTENDED-CONST
# EXTENDED-CONST-NOT: __wasm_apply_global_relocs
@@ -207,7 +207,7 @@ _start:
# to be generated along with __wasm_start as the start
# function.
-# RUN: wasm-ld --no-gc-sections --shared-memory --experimental-pic -pie --unresolved-symbols=import-dynamic -o %t.shmem.wasm %t.o %t.internal_func.o
+# RUN: wasm-ld --no-gc-sections --shared-memory -pie --unresolved-symbols=import-dynamic -o %t.shmem.wasm %t.o %t.internal_func.o
# RUN: obj2yaml %t.shmem.wasm | FileCheck %s --check-prefix=SHMEM
# RUN: llvm-objdump --disassemble-symbols=__wasm_start --no-show-raw-insn --no-leading-addr %t.shmem.wasm | FileCheck %s --check-prefix DISASSEM-SHMEM
diff --git a/lld/test/wasm/rpath.s b/lld/test/wasm/rpath.s
index 53372f490e9ad..1b430b40966a9 100644
--- a/lld/test/wasm/rpath.s
+++ b/lld/test/wasm/rpath.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
-# RUN: wasm-ld -shared -o %t1.wasm %t.o -rpath /a/b/c -rpath /x/y/z --experimental-pic
+# RUN: wasm-ld -shared -o %t1.wasm %t.o -rpath /a/b/c -rpath /x/y/z
# RUN: obj2yaml %t1.wasm | FileCheck %s
# CHECK: - Type: CUSTOM
diff --git a/lld/test/wasm/runtime-relocations-himem.s b/lld/test/wasm/runtime-relocations-himem.s
index a12a93a6cb933..2d39a204c7904 100644
--- a/lld/test/wasm/runtime-relocations-himem.s
+++ b/lld/test/wasm/runtime-relocations-himem.s
@@ -3,7 +3,7 @@
## instruction leading to invalid binaries.
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
-# RUN: wasm-ld --global-base=2147483648 --experimental-pic --unresolved-symbols=import-dynamic -no-gc-sections --shared-memory --no-entry -o %t.wasm %t.o
+# RUN: wasm-ld --global-base=2147483648 --unresolved-symbols=import-dynamic -no-gc-sections --shared-memory --no-entry -o %t.wasm %t.o
# XUN: obj2yaml %t.wasm | FileCheck %s
# RUN: llvm-objdump -d --no-show-raw-insn --no-leading-addr %t.wasm | FileCheck %s --
diff --git a/lld/test/wasm/shared-export-dynamic.s b/lld/test/wasm/shared-export-dynamic.s
index 015d73388f2b7..e651bd0e4d0bd 100644
--- a/lld/test/wasm/shared-export-dynamic.s
+++ b/lld/test/wasm/shared-export-dynamic.s
@@ -1,12 +1,12 @@
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
# By default all `default` symbols should be exported
-# RUN: wasm-ld -shared --expe...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/196566
More information about the llvm-commits
mailing list