]> git.proxmox.com Git - rustc.git/blob - tests/run-make/rlib-format-packed-bundled-libs-2/Makefile
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / run-make / rlib-format-packed-bundled-libs-2 / Makefile
1 -include ../../run-make-fulldeps/tools.mk
2
3 # ignore-cross-compile
4
5 # Make sure -Zpacked_bundled_libs is compatible with verbatim.
6
7 # We're using the llvm-nm instead of the system nm to ensure it is compatible
8 # with the LLVM bitcode generated by rustc.
9 # Except on Windows where piping/IO redirection under MSYS2 is wonky with llvm-nm.
10 ifndef IS_WINDOWS
11 NM = "$(LLVM_BIN_DIR)"/llvm-nm
12 else
13 NM = nm
14 endif
15
16 all:
17 # Build strange-named dep.
18 $(RUSTC) native_dep.rs --crate-type=staticlib -o $(TMPDIR)/native_dep.ext
19
20 $(RUSTC) rust_dep.rs --crate-type=rlib -Zpacked_bundled_libs
21 $(NM) $(TMPDIR)/librust_dep.rlib | $(CGREP) -e "U.*native_f1"
22 $(AR) t $(TMPDIR)/librust_dep.rlib | $(CGREP) "native_dep.ext"
23
24 # Make sure compiler doesn't use files, that it shouldn't know about.
25 rm $(TMPDIR)/native_dep.ext
26
27 $(RUSTC) main.rs --extern rust_dep=$(TMPDIR)/librust_dep.rlib -Zpacked_bundled_libs