mk: Add configure option for disabling codegen tests
Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately this isn't always available in all custom LLVM roots (e.g. those specified via `--llvm-root`). This commit adds a `./configure` option called `--disable-codegen-tests` which will manually disable running these tests. In the case that this option is passed we can forgo the need for the `FileCheck` executable. Note that we still require `FileCheck` by default as we will attempt to run these tests. Closes #28667
This commit is contained in:
parent
080edd9957
commit
a3fdde7453
2 changed files with 10 additions and 3 deletions
5
configure
vendored
5
configure
vendored
|
@ -608,6 +608,7 @@ opt inject-std-version 1 "inject the current compiler version of libstd into pro
|
||||||
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
|
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
|
||||||
opt rustbuild 0 "use the rust and cargo based build system"
|
opt rustbuild 0 "use the rust and cargo based build system"
|
||||||
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
|
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
|
||||||
|
opt codegen-tests 1 "run the src/test/codegen tests"
|
||||||
|
|
||||||
# Optimization and debugging options. These may be overridden by the release channel, etc.
|
# Optimization and debugging options. These may be overridden by the release channel, etc.
|
||||||
opt_nosave optimize 1 "build optimized rust code"
|
opt_nosave optimize 1 "build optimized rust code"
|
||||||
|
@ -1497,7 +1498,9 @@ do
|
||||||
LLVM_INST_DIR=$CFG_LLVM_ROOT
|
LLVM_INST_DIR=$CFG_LLVM_ROOT
|
||||||
do_reconfigure=0
|
do_reconfigure=0
|
||||||
# Check that LLVm FileCheck is available. Needed for the tests
|
# Check that LLVm FileCheck is available. Needed for the tests
|
||||||
need_cmd $LLVM_INST_DIR/bin/FileCheck
|
if [ -z "$CFG_DISABLE_CODEGEN_TESTS" ]; then
|
||||||
|
need_cmd $LLVM_INST_DIR/bin/FileCheck
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${do_reconfigure} -ne 0 ]
|
if [ ${do_reconfigure} -ne 0 ]
|
||||||
|
|
|
@ -305,11 +305,15 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
|
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
|
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
|
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
|
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec \
|
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
|
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
|
||||||
|
|
||||||
|
ifndef CFG_DISABLE_CODEGEN_TESTS
|
||||||
|
check-stage$(1)-T-$(2)-H-$(3)-exec: \
|
||||||
|
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
|
||||||
|
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec
|
||||||
|
endif
|
||||||
|
|
||||||
# Only test the compiler-dependent crates when the target is
|
# Only test the compiler-dependent crates when the target is
|
||||||
# able to build a compiler (when the target triple is in the set of host triples)
|
# able to build a compiler (when the target triple is in the set of host triples)
|
||||||
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
|
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
|
||||||
|
|
Loading…
Add table
Reference in a new issue