Skip to content

Commit 2682b88

Browse files
committed
Auto merge of rust-lang#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.
2 parents a51fb2b + 4151a5b commit 2682b88

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

Diff for: src/bootstrap/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1212
- 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)
1313
- Change the names for `dist` commands to match the component they generate. [#90684](https://github.com/rust-lang/rust/pull/90684)
1414
- 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`.
15+
- Several unsupported `./configure` options have been removed: `optimize`, `parallel-compiler`. These can still be enabled with `--set`, although it isn't recommended.
1516

1617
### Non-breaking changes
1718

Diff for: src/bootstrap/configure.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ def v(*args):
3131
options.append(Option(*args, value=True))
3232

3333

34-
o("debug", "rust.debug", "enables debugging environment; does not affect optimization of bootstrapped code (use `--disable-optimize` for that)")
34+
o("debug", "rust.debug", "enables debugging environment; does not affect optimization of bootstrapped code")
3535
o("docs", "build.docs", "build standard library documentation")
3636
o("compiler-docs", "build.compiler-docs", "build compiler documentation")
3737
o("optimize-tests", "rust.optimize-tests", "build tests with optimizations")
38-
o("parallel-compiler", "rust.parallel-compiler", "build a multi-threaded rustc")
3938
o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests")
4039
o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds")
4140
o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds")
@@ -70,7 +69,6 @@ def v(*args):
7069

7170
# Optimization and debugging options. These may be overridden by the release
7271
# channel, etc.
73-
o("optimize", "rust.optimize", "build optimized rust code")
7472
o("optimize-llvm", "llvm.optimize", "build optimized LLVM")
7573
o("llvm-assertions", "llvm.assertions", "build LLVM with assertions")
7674
o("llvm-plugins", "llvm.plugins", "build LLVM with plugin interface")
@@ -161,7 +159,7 @@ def v(*args):
161159
# Many of these are saved below during the "writing configuration" step
162160
# (others are conditionally saved).
163161
o("manage-submodules", "build.submodules", "let the build manage the git submodules")
164-
o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two")
162+
o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two (not recommended except for testing reproducible builds)")
165163
o("extended", "build.extended", "build an extended rust tool set")
166164

167165
v("tools", None, "List of extended tools will be installed")
@@ -493,4 +491,3 @@ def configure_section(lines, config):
493491

494492
p("")
495493
p("run `python {}/x.py --help`".format(rust_dir))
496-
p("")

Diff for: src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ENV RUST_CONFIGURE_ARGS \
3535
--build=x86_64-unknown-linux-gnu \
3636
--enable-debug \
3737
--enable-lld \
38-
--enable-optimize \
3938
--set llvm.use-linker=lld \
4039
--set target.x86_64-unknown-linux-gnu.linker=clang \
4140
--set target.x86_64-unknown-linux-gnu.cc=clang \

Diff for: src/ci/docker/scripts/musl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ ! -d $MUSL ]; then
3333
fi
3434

3535
cd $MUSL
36-
./configure --enable-optimize --enable-debug --disable-shared --prefix=/musl-$TAG "$@"
36+
./configure --enable-debug --disable-shared --prefix=/musl-$TAG "$@"
3737
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
3838
hide_output make -j$(nproc) AR=ar RANLIB=ranlib
3939
else

Diff for: src/ci/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ trap datecheck EXIT
132132
SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true
133133

134134
if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
135-
$SRC/configure --enable-parallel-compiler
135+
$SRC/configure --set rust.parallel-compiler
136136
CARGO_INCREMENTAL=0 $PYTHON ../x.py check
137137
rm -f config.toml
138138
rm -rf build

0 commit comments

Comments
 (0)