Skip to content

Commit 4b5beae

Browse files
committed
adapt static-nobundle test to use llvm-nm
No functional changes intended. This updates the test case to use llvm-nm instead of the system nm. This fixes an instance over at the experimental build of rustc with HEAD LLVM: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/8380#ef6f41b5-8595-49a6-be37-0eff80e0ccb5 It is related to rust-lang#94001. The issue is that this test uses the system nm, which may not be recent enough to understand the update to uwtable. This replaces the test to use the llvm-nm that should be recent enough (consistent with the LLVM sources we use to build rustc).
1 parent 6421a49 commit 4b5beae

File tree

1 file changed

+4
-2
lines changed
  • src/test/run-make-fulldeps/static-nobundle

1 file changed

+4
-2
lines changed

src/test/run-make-fulldeps/static-nobundle/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ all: $(call NATIVE_STATICLIB,aaa)
99
$(RUSTC) bbb.rs --crate-type=rlib
1010

1111
# Check that bbb does NOT contain the definition of `native_func`
12-
nm $(TMPDIR)/libbbb.rlib | $(CGREP) -ve "T _*native_func"
13-
nm $(TMPDIR)/libbbb.rlib | $(CGREP) -e "U _*native_func"
12+
# We're using the llvm-nm instead of the system nm to ensure it
13+
# is compatible with the LLVM bitcode generated by rustc.
14+
"$(LLVM_BIN_DIR)/llvm-nm" $(TMPDIR)/libbbb.rlib | $(CGREP) -ve "T _*native_func"
15+
"$(LLVM_BIN_DIR)/llvm-nm" $(TMPDIR)/libbbb.rlib | $(CGREP) -e "U _*native_func"
1416

1517
# Check that aaa gets linked (either as `-l aaa` or `aaa.lib`) when building ccc.
1618
$(RUSTC) ccc.rs -C prefer-dynamic --crate-type=dylib --print link-args | $(CGREP) -e '-l[" ]*aaa|aaa\.lib'

0 commit comments

Comments
 (0)