]>
git.proxmox.com Git - rustc.git/blob - tests/run-make/rlib-format-packed-bundled-libs-2/Makefile
1 -include ..
/..
/run-make-fulldeps
/tools.mk
5 # Make sure -Zpacked_bundled_libs is compatible with verbatim.
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.
11 NM
= "$(LLVM_BIN_DIR)"/llvm-nm
17 # Build strange-named dep.
18 $(RUSTC
) native_dep.rs
--crate-type
=staticlib
-o
$(TMPDIR
)/native_dep.ext
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"
24 # Make sure compiler doesn't use files, that it shouldn't know about.
25 rm $(TMPDIR
)/native_dep.ext
27 $(RUSTC
) main.rs
--extern rust_dep
=$(TMPDIR
)/librust_dep.rlib
-Zpacked_bundled_libs