Author: Jonas Devlieghere
Date: 2026-06-30T18:46:24Z
New Revision: 92a84f255ec80c1d8a0ec51409d383e8828f0c1a

URL: 
https://github.com/llvm/llvm-project/commit/92a84f255ec80c1d8a0ec51409d383e8828f0c1a
DIFF: 
https://github.com/llvm/llvm-project/commit/92a84f255ec80c1d8a0ec51409d383e8828f0c1a.diff

LOG: [lldb][test] Don't dead-strip WebAssembly test inferiors (#206799)

Unlike most native linkers, wasm-ld garbage-collects unreferenced
sections by default. Globals and functions that a test inspects but the
program never references therefore get dead-stripped from the inferior,
even though they would survive on other targets.

Default to `-Wl,--no-gc-sections` in WASI.rules so debug-info coverage
matches other targets.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/make/WASI.rules

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/make/WASI.rules 
b/lldb/packages/Python/lldbsuite/test/make/WASI.rules
index 03a25d6400c2f..32e5656c41c4f 100644
--- a/lldb/packages/Python/lldbsuite/test/make/WASI.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/WASI.rules
@@ -10,3 +10,7 @@ ARCH_CXXFLAGS += \
 ARCH_LDFLAGS += \
        $(if $(RESOURCE_DIR),-resource-dir $(RESOURCE_DIR)) \
        -Wl,--allow-undefined
+
+# Unlike most native linkers, wasm-ld garbage-collects unreferenced sections by
+# default, which strips globals and functions that a test wants to inspect.
+LDFLAGS += -Wl,--no-gc-sections


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to