[llvm] SymbolizableObjectFile: Fix Wasm test to avoid layering violation (PR #193574)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 12:46:10 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-binary-utilities

Author: Derek Schuff (dschuff)

<details>
<summary>Changes</summary>

Tests for LLVM libraries should not require wasm-ld. It's not necessary in this case to generate the binary at test time, so just check it in.

---
Full diff: https://github.com/llvm/llvm-project/pull/193574.diff


2 Files Affected:

- (added) llvm/test/tools/llvm-objdump/wasm/Inputs/line-numbers.wasm () 
- (modified) llvm/test/tools/llvm-objdump/wasm/line-numbers.s (+6-3) 


``````````diff
diff --git a/llvm/test/tools/llvm-objdump/wasm/Inputs/line-numbers.wasm b/llvm/test/tools/llvm-objdump/wasm/Inputs/line-numbers.wasm
new file mode 100755
index 0000000000000..593a3857cd17a
Binary files /dev/null and b/llvm/test/tools/llvm-objdump/wasm/Inputs/line-numbers.wasm differ
diff --git a/llvm/test/tools/llvm-objdump/wasm/line-numbers.s b/llvm/test/tools/llvm-objdump/wasm/line-numbers.s
index 829c79908bb12..8151a2683917b 100644
--- a/llvm/test/tools/llvm-objdump/wasm/line-numbers.s
+++ b/llvm/test/tools/llvm-objdump/wasm/line-numbers.s
@@ -1,8 +1,11 @@
-# REQUIRES: webassembly-registered-target, lld
+# REQUIRES: webassembly-registered-target
 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj %s -o %t.o -g
-# RUN: wasm-ld %t.o -o %t.wasm --no-entry --export=foo --export=bar
 # RUN: llvm-objdump -d --line-numbers %t.o | FileCheck --check-prefix=OBJ %s
-# RUN: llvm-objdump -d --line-numbers %t.wasm | FileCheck --check-prefix=LINKED %s
+
+# The pre-compiled line-numbers.wasm test was created by linking this object file:
+#  wasm-ld %t.o -o %t.wasm --no-entry --export=foo --export=bar
+# However the binary is checked in to avoid a dependence on wasm-ld.
+# RUN: llvm-objdump -d --line-numbers %S/Inputs/line-numbers.wasm | FileCheck --check-prefix=LINKED %s
 
 # This test mirrors test/tools/llvm-symbolizer/wasm-basic.s and tests that line
 # numbers are correctly printed from DWARF information.

``````````

</details>


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


More information about the llvm-commits mailing list