Skip to content

Commit 1215ea4

Browse files
committed
add cdylib-bundled-split test
1 parent 8d09ef9 commit 1215ea4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/test/run-make/native-link-modifier-bundle/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# with the LLVM bitcode generated by rustc.
88
NM = "$(LLVM_BIN_DIR)"/llvm-nm
99
SPLIT = "-Zsplit-bundled-libs"
10-
BUNDLED_LIB = "libbundled.rlib.bundle.native-staticlib.a"
10+
BUNDLED_LIB = "libbundled_split.rlib.bundle.native-staticlib.a"
1111

1212

1313
all: $(call NATIVE_STATICLIB,native-staticlib)
@@ -42,7 +42,7 @@ all: $(call NATIVE_STATICLIB,native-staticlib)
4242
$(NM) $(TMPDIR)/libbundled_split.rlib | $(CGREP) -ve "T _*native_func"
4343
$(NM) $(TMPDIR)/libbundled_split.rlib | $(CGREP) -e "U _*native_func"
4444

45-
# Build a cdylib, `native-staticlib` will appear on the linker line because it was not bundled previously
45+
# Build a cdylib, 'BUNDLED_LIB' will appear on the linker line
4646
# The cdylib will contain the `native_func` symbol in the end
47-
$(RUSTC) cdylib-non-bundled.rs --crate-type=cdylib --print link-args $(SPLIT) --crate-name=cdylib_non_bundled_split | $(CGREP) -e '-l[" ]*native-staticlib'
48-
$(NM) $(call DYLIB,cdylib_non_bundled_split) | $(CGREP) -e "[Tt] _*native_func"
47+
$(RUSTC) cdylib-bundled-split.rs --crate-type=cdylib --print link-args $(SPLIT) | $(CGREP) -e $(BUNDLED_LIB)
48+
$(NM) $(call DYLIB,cdylib_bundled_split) | $(CGREP) -e "[Tt] _*native_func"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extern crate bundled_split;

0 commit comments

Comments
 (0)