fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1include ../tools.mk 2 3# only-linux 4 5all: 6 # `-Ccodegen-units=16 -Copt-level=2` is used here to trigger thin LTO 7 # across codegen units to test deduplication of the named metadata 8 # (see `LLVMRustPrepareThinLTOImport` for details). 9 echo 'fn main(){}' | $(RUSTC) - --emit=link,obj -Csave-temps -Ccodegen-units=16 -Copt-level=2 --target=$(TARGET) 10 11 # `llvm-dis` is used here since `--emit=llvm-ir` does not emit LLVM IR 12 # for temporary outputs. 13 "$(LLVM_BIN_DIR)"/llvm-dis $(TMPDIR)/*.bc 14 15 # Check LLVM IR files (including temporary outputs) have `!llvm.ident` 16 # named metadata, reusing the related codegen test. 17 set -e; for f in $(TMPDIR)/*.ll; do \ 18 $(LLVM_FILECHECK) --input-file $$f ../../codegen/llvm-ident.rs; \ 19 done