Auto merge of #98369 - jyn514:configure.py, r=Mark-Simulacrum

Remove unsupported options in configure.py

I've seen people using `optimize = false` and `full-bootstrap = true` in the past, without knowing
that they're not recommended. Remove `optimize` and a few other options that are always a bad idea,
and document that full-bootstrap is only for testing reproducible builds.
This commit is contained in:
bors 2022-07-11 06:37:20 +00:00
commit 2682b88c52
5 changed files with 5 additions and 8 deletions

View File

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- The options `infodir`, `localstatedir`, and `gpg-password-file` are no longer allowed in config.toml. Previously, they were ignored without warning. Note that `infodir` and `localstatedir` are still accepted by `./configure`, with a warning. [#82451](https://github.com/rust-lang/rust/pull/82451) - The options `infodir`, `localstatedir`, and `gpg-password-file` are no longer allowed in config.toml. Previously, they were ignored without warning. Note that `infodir` and `localstatedir` are still accepted by `./configure`, with a warning. [#82451](https://github.com/rust-lang/rust/pull/82451)
- Change the names for `dist` commands to match the component they generate. [#90684](https://github.com/rust-lang/rust/pull/90684) - Change the names for `dist` commands to match the component they generate. [#90684](https://github.com/rust-lang/rust/pull/90684)
- The `build.fast-submodules` option has been removed. Fast submodule checkouts are enabled unconditionally. Automatic submodule handling can still be disabled with `build.submodules = false`. - The `build.fast-submodules` option has been removed. Fast submodule checkouts are enabled unconditionally. Automatic submodule handling can still be disabled with `build.submodules = false`.
- Several unsupported `./configure` options have been removed: `optimize`, `parallel-compiler`. These can still be enabled with `--set`, although it isn't recommended.
### Non-breaking changes ### Non-breaking changes

View File

@ -31,11 +31,10 @@ def v(*args):
options.append(Option(*args, value=True)) options.append(Option(*args, value=True))
o("debug", "rust.debug", "enables debugging environment; does not affect optimization of bootstrapped code (use `--disable-optimize` for that)") o("debug", "rust.debug", "enables debugging environment; does not affect optimization of bootstrapped code")
o("docs", "build.docs", "build standard library documentation") o("docs", "build.docs", "build standard library documentation")
o("compiler-docs", "build.compiler-docs", "build compiler documentation") o("compiler-docs", "build.compiler-docs", "build compiler documentation")
o("optimize-tests", "rust.optimize-tests", "build tests with optimizations") o("optimize-tests", "rust.optimize-tests", "build tests with optimizations")
o("parallel-compiler", "rust.parallel-compiler", "build a multi-threaded rustc")
o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests") o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests")
o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds") o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds")
o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds") o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds")
@ -70,7 +69,6 @@ v("llvm-libunwind", "rust.llvm-libunwind", "use LLVM libunwind")
# Optimization and debugging options. These may be overridden by the release # Optimization and debugging options. These may be overridden by the release
# channel, etc. # channel, etc.
o("optimize", "rust.optimize", "build optimized rust code")
o("optimize-llvm", "llvm.optimize", "build optimized LLVM") o("optimize-llvm", "llvm.optimize", "build optimized LLVM")
o("llvm-assertions", "llvm.assertions", "build LLVM with assertions") o("llvm-assertions", "llvm.assertions", "build LLVM with assertions")
o("llvm-plugins", "llvm.plugins", "build LLVM with plugin interface") o("llvm-plugins", "llvm.plugins", "build LLVM with plugin interface")
@ -161,7 +159,7 @@ v("default-linker", "rust.default-linker", "the default linker")
# Many of these are saved below during the "writing configuration" step # Many of these are saved below during the "writing configuration" step
# (others are conditionally saved). # (others are conditionally saved).
o("manage-submodules", "build.submodules", "let the build manage the git submodules") o("manage-submodules", "build.submodules", "let the build manage the git submodules")
o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two") o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two (not recommended except for testing reproducible builds)")
o("extended", "build.extended", "build an extended rust tool set") o("extended", "build.extended", "build an extended rust tool set")
v("tools", None, "List of extended tools will be installed") v("tools", None, "List of extended tools will be installed")
@ -493,4 +491,3 @@ with bootstrap.output('Makefile') as f:
p("") p("")
p("run `python {}/x.py --help`".format(rust_dir)) p("run `python {}/x.py --help`".format(rust_dir))
p("")

View File

@ -35,7 +35,6 @@ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \ --build=x86_64-unknown-linux-gnu \
--enable-debug \ --enable-debug \
--enable-lld \ --enable-lld \
--enable-optimize \
--set llvm.use-linker=lld \ --set llvm.use-linker=lld \
--set target.x86_64-unknown-linux-gnu.linker=clang \ --set target.x86_64-unknown-linux-gnu.linker=clang \
--set target.x86_64-unknown-linux-gnu.cc=clang \ --set target.x86_64-unknown-linux-gnu.cc=clang \

View File

@ -33,7 +33,7 @@ if [ ! -d $MUSL ]; then
fi fi
cd $MUSL cd $MUSL
./configure --enable-optimize --enable-debug --disable-shared --prefix=/musl-$TAG "$@" ./configure --enable-debug --disable-shared --prefix=/musl-$TAG "$@"
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
hide_output make -j$(nproc) AR=ar RANLIB=ranlib hide_output make -j$(nproc) AR=ar RANLIB=ranlib
else else

View File

@ -132,7 +132,7 @@ trap datecheck EXIT
SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true
if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
$SRC/configure --enable-parallel-compiler $SRC/configure --set rust.parallel-compiler
CARGO_INCREMENTAL=0 $PYTHON ../x.py check CARGO_INCREMENTAL=0 $PYTHON ../x.py check
rm -f config.toml rm -f config.toml
rm -rf build rm -rf build