about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-22 11:58:53 -0700
committerbors <bors@rust-lang.org>2016-04-22 11:58:53 -0700
commitaf000a7bbffcaf5e75ff97b245fa5a413062acc1 (patch)
tree3164855985849a295dad235a6ae8bdfe81e09b1d
parenta264f5b7e8df34c4bf7f10d0c6c7f9ab805ee672 (diff)
parent46b75eb54bf19aa0eeb9d362b5387892fd2c2dfd (diff)
downloadrust-af000a7bbffcaf5e75ff97b245fa5a413062acc1.tar.gz
rust-af000a7bbffcaf5e75ff97b245fa5a413062acc1.zip
Auto merge of #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.
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index fdef550a645..db3ca2eecbb 100755
--- a/configure
+++ b/configure
@@ -609,6 +609,7 @@ 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 orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
 opt codegen-tests 1 "run the src/test/codegen tests"
+opt option-checking 1 "complain about unrecognized options in this configure script"
 
 # Optimization and debugging options. These may be overridden by the release channel, etc.
 opt_nosave optimize 1 "build optimized rust code"
@@ -674,8 +675,11 @@ then
 fi
 
 # Validate Options
-step_msg "validating $CFG_SELF args"
-validate_opt
+if [ -z "$CFG_DISABLE_OPTION_CHECKING" ]
+then
+    step_msg "validating $CFG_SELF args"
+    validate_opt
+fi
 
 # Validate the release channel, and configure options
 case "$CFG_RELEASE_CHANNEL" in