plumbing to automatically run MIR for crates where it works;
this serves as a poor man's unit test infrastructure until MIR is more built up
This commit is contained in:
parent
faa9ec81b5
commit
9b45874445
12
mk/main.mk
12
mk/main.mk
@ -172,6 +172,18 @@ RUST_LIB_FLAGS_ST3 += -C prefer-dynamic
|
||||
# by not emitting them.
|
||||
RUSTFLAGS_STAGE0 += -Z no-landing-pads
|
||||
|
||||
# Enable MIR to "always build" for crates where this works. This is
|
||||
# just temporary while MIR is being actively built up -- it's just a
|
||||
# poor man's unit testing infrastructure. Anyway we only want this for
|
||||
# stage1/stage2.
|
||||
define ADD_MIR_FLAG
|
||||
RUSTFLAGS1_$(1) += -Z always-build-mir
|
||||
RUSTFLAGS2_$(1) += -Z always-build-mir
|
||||
endef
|
||||
$(foreach crate,$(TARGET_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
|
||||
$(foreach crate,$(RUSTC_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
|
||||
$(foreach crate,syntax,$(eval $(call ADD_MIR_FLAG,$(crate))))
|
||||
|
||||
# platform-specific auto-configuration
|
||||
include $(CFG_SRC_DIR)mk/platform.mk
|
||||
|
||||
|
@ -93,6 +93,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
|
||||
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
|
||||
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
|
||||
$$(RUSTFLAGS_$(4)) \
|
||||
$$(RUSTFLAGS$(1)_$(4)) \
|
||||
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
|
||||
--out-dir $$(@D) \
|
||||
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user