2021-11-07 02:43:49 -06:00
|
|
|
# needs-llvm-components: x86 arm
|
|
|
|
|
2022-08-22 19:00:00 -05:00
|
|
|
include ../tools.mk
|
2016-01-25 13:36:18 -06:00
|
|
|
|
2023-04-24 19:57:41 -05:00
|
|
|
all: default output_to_file
|
2017-11-23 09:19:50 -06:00
|
|
|
$(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
|
|
|
|
$(RUSTC) --target i686-apple-darwin --print cfg | $(CGREP) macos
|
|
|
|
$(RUSTC) --target i686-unknown-linux-gnu --print cfg | $(CGREP) gnu
|
2021-07-07 00:00:53 -05:00
|
|
|
$(RUSTC) --target arm-unknown-linux-gnueabihf --print cfg | $(CGREP) target_abi=
|
|
|
|
$(RUSTC) --target arm-unknown-linux-gnueabihf --print cfg | $(CGREP) eabihf
|
2016-01-25 13:36:18 -06:00
|
|
|
|
2023-04-24 19:57:41 -05:00
|
|
|
output_to_file:
|
|
|
|
# Backend-independent, printed by rustc_driver_impl/src/lib.rs
|
2023-07-28 13:44:25 -05:00
|
|
|
$(RUSTC) --target x86_64-pc-windows-gnu --print cfg=$(TMPDIR)/cfg.txt
|
2023-04-24 19:57:41 -05:00
|
|
|
$(CGREP) windows < $(TMPDIR)/cfg.txt
|
|
|
|
|
|
|
|
# Printed from CodegenBackend trait impl in rustc_codegen_llvm/src/lib.rs
|
2023-07-28 13:44:25 -05:00
|
|
|
$(RUSTC) --print relocation-models=$(TMPDIR)/relocation-models.txt
|
2023-04-24 19:57:41 -05:00
|
|
|
$(CGREP) dynamic-no-pic < $(TMPDIR)/relocation-models.txt
|
|
|
|
|
|
|
|
# Printed by compiler/rustc_codegen_llvm/src/llvm_util.rs
|
2023-07-28 13:44:25 -05:00
|
|
|
$(RUSTC) --target wasm32-unknown-unknown --print target-features=$(TMPDIR)/target-features.txt
|
2023-04-24 19:57:41 -05:00
|
|
|
$(CGREP) reference-types < $(TMPDIR)/target-features.txt
|
|
|
|
|
|
|
|
# Printed by C++ code in rustc_llvm/llvm-wrapper/PassWrapper.cpp
|
2023-07-28 13:44:25 -05:00
|
|
|
$(RUSTC) --target wasm32-unknown-unknown --print target-cpus=$(TMPDIR)/target-cpus.txt
|
2023-04-24 19:57:41 -05:00
|
|
|
$(CGREP) generic < $(TMPDIR)/target-cpus.txt
|
|
|
|
|
2016-01-25 13:36:18 -06:00
|
|
|
ifdef IS_WINDOWS
|
|
|
|
default:
|
2017-11-23 09:19:50 -06:00
|
|
|
$(RUSTC) --print cfg | $(CGREP) windows
|
2016-01-25 13:36:18 -06:00
|
|
|
else
|
|
|
|
default:
|
2017-11-23 09:19:50 -06:00
|
|
|
$(RUSTC) --print cfg | $(CGREP) unix
|
2016-01-25 13:36:18 -06:00
|
|
|
endif
|