Skip to content

Commit

Permalink
Extend testing of --print -o
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 14, 2023
1 parent df5dede commit 3a4d73f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/run-make/print-cfg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@ all: default output_to_file
$(RUSTC) --target arm-unknown-linux-gnueabihf --print cfg | $(CGREP) eabihf

output_to_file:
# Backend-independent, printed by rustc_driver_impl/src/lib.rs
-rm $(TMPDIR)/cfg.txt
$(RUSTC) --target x86_64-pc-windows-gnu --print=cfg -o $(TMPDIR)/cfg.txt
$(CGREP) windows < $(TMPDIR)/cfg.txt

# Printed from CodegenBackend trait impl in rustc_codegen_llvm/src/lib.rs
-rm $(TMPDIR)/cfg.txt
$(RUSTC) --print=relocation-models -o $(TMPDIR)/cfg.txt
$(CGREP) dynamic-no-pic < $(TMPDIR)/cfg.txt

# Printed by compiler/rustc_codegen_llvm/src/llvm_util.rs
-rm $(TMPDIR)/cfg.txt
$(RUSTC) --target wasm32-unknown-unknown --print=target-features -o $(TMPDIR)/cfg.txt
$(CGREP) reference-types < $(TMPDIR)/cfg.txt

# Printed by C++ code in rustc_llvm/llvm-wrapper/PassWrapper.cpp
-rm $(TMPDIR)/cfg.txt
$(RUSTC) --target x86_64-pc-windows-gnu --print=target-cpus -o $(TMPDIR)/cfg.txt
$(CGREP) native < $(TMPDIR)/cfg.txt
Expand Down

0 comments on commit 3a4d73f

Please sign in to comment.