diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 029049d543435..8693e85e4742f 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2056,6 +2056,7 @@ impl Step for RustDev { "llvm-bcanalyzer", "llvm-cov", "llvm-dwp", + "llvm-nm", ] { tarball.add_file(src_bindir.join(exe(bin, target)), "bin", 0o755); } diff --git a/src/test/run-make-fulldeps/static-nobundle/Makefile b/src/test/run-make-fulldeps/static-nobundle/Makefile index 8f78c401a1141..001081798a6e4 100644 --- a/src/test/run-make-fulldeps/static-nobundle/Makefile +++ b/src/test/run-make-fulldeps/static-nobundle/Makefile @@ -9,8 +9,10 @@ all: $(call NATIVE_STATICLIB,aaa) $(RUSTC) bbb.rs --crate-type=rlib # Check that bbb does NOT contain the definition of `native_func` - nm $(TMPDIR)/libbbb.rlib | $(CGREP) -ve "T _*native_func" - nm $(TMPDIR)/libbbb.rlib | $(CGREP) -e "U _*native_func" + # We're using the llvm-nm instead of the system nm to ensure it + # is compatible with the LLVM bitcode generated by rustc. + "$(LLVM_BIN_DIR)/llvm-nm" $(TMPDIR)/libbbb.rlib | $(CGREP) -ve "T _*native_func" + "$(LLVM_BIN_DIR)/llvm-nm" $(TMPDIR)/libbbb.rlib | $(CGREP) -e "U _*native_func" # Check that aaa gets linked (either as `-l aaa` or `aaa.lib`) when building ccc. $(RUSTC) ccc.rs -C prefer-dynamic --crate-type=dylib --print link-args | $(CGREP) -e '-l[" ]*aaa|aaa\.lib'