Skip to content

Commit

Permalink
Auto merge of #31169 - gmbonnet:disable-option-checking, r=brson
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Apr 22, 2016
2 parents a264f5b + 46b75eb commit af000a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit af000a7

Please sign in to comment.