summaryrefslogtreecommitdiffstats
path: root/tests/run-make/print-cfg
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/run-make/print-cfg
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/print-cfg')
-rw-r--r--tests/run-make/print-cfg/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/run-make/print-cfg/Makefile b/tests/run-make/print-cfg/Makefile
index 126f5768c..654c303b3 100644
--- a/tests/run-make/print-cfg/Makefile
+++ b/tests/run-make/print-cfg/Makefile
@@ -2,7 +2,7 @@
include ../tools.mk
-all: default
+all: default output_to_file
$(RUSTC) --target x86_64-pc-windows-gnu --print cfg | $(CGREP) windows
$(RUSTC) --target x86_64-pc-windows-gnu --print cfg | $(CGREP) x86_64
$(RUSTC) --target i686-pc-windows-msvc --print cfg | $(CGREP) msvc
@@ -11,6 +11,23 @@ all: default
$(RUSTC) --target arm-unknown-linux-gnueabihf --print cfg | $(CGREP) target_abi=
$(RUSTC) --target arm-unknown-linux-gnueabihf --print cfg | $(CGREP) eabihf
+output_to_file:
+ # Backend-independent, printed by rustc_driver_impl/src/lib.rs
+ $(RUSTC) --target x86_64-pc-windows-gnu --print cfg=$(TMPDIR)/cfg.txt -Z unstable-options
+ $(CGREP) windows < $(TMPDIR)/cfg.txt
+
+ # Printed from CodegenBackend trait impl in rustc_codegen_llvm/src/lib.rs
+ $(RUSTC) --print relocation-models=$(TMPDIR)/relocation-models.txt -Z unstable-options
+ $(CGREP) dynamic-no-pic < $(TMPDIR)/relocation-models.txt
+
+ # Printed by compiler/rustc_codegen_llvm/src/llvm_util.rs
+ $(RUSTC) --target wasm32-unknown-unknown --print target-features=$(TMPDIR)/target-features.txt -Z unstable-options
+ $(CGREP) reference-types < $(TMPDIR)/target-features.txt
+
+ # Printed by C++ code in rustc_llvm/llvm-wrapper/PassWrapper.cpp
+ $(RUSTC) --target wasm32-unknown-unknown --print target-cpus=$(TMPDIR)/target-cpus.txt -Z unstable-options
+ $(CGREP) generic < $(TMPDIR)/target-cpus.txt
+
ifdef IS_WINDOWS
default:
$(RUSTC) --print cfg | $(CGREP) windows