Skip to content

Commit db8e996

Browse files
committed
Rollup merge of rust-lang#31169 - gmbonnet:disable-option-checking, r=brson
configure: Support --disable-option-checking I'm trying to package Rust for Fedora (this is nothing official (yet)). The standard RPM packaging process involves running `./configure` with a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least `--disable-option-checking`, so Rust's configure script would not fail. [The old attempt](https://github.com/fabiand/rust-spec/blob/master/rustc.spec) to package Rust used a sed script (at line 72), but this is not the recommended way to do that.
2 parents a264f5b + 46b75eb commit db8e996

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

configure

+6-2
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609609
opt rustbuild 0 "use the rust and cargo based build system"
610610
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
611611
opt codegen-tests 1 "run the src/test/codegen tests"
612+
opt option-checking 1 "complain about unrecognized options in this configure script"
612613

613614
# Optimization and debugging options. These may be overridden by the release channel, etc.
614615
opt_nosave optimize 1 "build optimized rust code"
@@ -674,8 +675,11 @@ then
674675
fi
675676

676677
# Validate Options
677-
step_msg "validating $CFG_SELF args"
678-
validate_opt
678+
if [ -z "$CFG_DISABLE_OPTION_CHECKING" ]
679+
then
680+
step_msg "validating $CFG_SELF args"
681+
validate_opt
682+
fi
679683

680684
# Validate the release channel, and configure options
681685
case "$CFG_RELEASE_CHANNEL" in

0 commit comments

Comments
 (0)