Skip to content

Commit 803a255

Browse files
authored
Rollup merge of rust-lang#94023 - krasimirgg:head-llvm-use-llvm-nm, r=Mark-Simulacrum
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).
2 parents ba625c5 + 0647e38 commit 803a255

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/bootstrap/dist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,7 @@ impl Step for RustDev {
20562056
"llvm-bcanalyzer",
20572057
"llvm-cov",
20582058
"llvm-dwp",
2059+
"llvm-nm",
20592060
] {
20602061
tarball.add_file(src_bindir.join(exe(bin, target)), "bin", 0o755);
20612062
}

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)