about summary refs log tree commit diff
path: root/src/bootstrap/configure.py
AgeCommit message (Collapse)AuthorLines
2025-09-16Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded ↵Haidong Zhang-0/+5
parallel compilation
2025-07-08SpellingAleksey Kliger-1/+1
2025-07-08Rewrite for clarityAleksey Kliger-12/+14
move common code to a helper function Co-Authored-By: Kobzol <berykubik@gmail.com>
2025-07-07Add docstringAleksey Kliger-0/+4
2025-07-07configure.py: Write last key in each sectionAleksey Kliger-0/+4
The loop that writes the keys in each section of bootstrap.toml accumulates all the commented lines before a given key and emits them when it reaches the next key in the section. This ends up dropping lines accumulated for the last key
2025-06-20configure.py: fix edge casebinarycat-1/+1
2025-06-20update configure.py to handle new bootstrap.example.tomlbinarycat-7/+24
2025-03-24Add target maintainer information for powerpc64-unknown-linux-muslJens Reidel-0/+5
We intend to fix the outstanding issues on the target and eventually promote it to tier 2. We have the capacity to maintain this target in the future and already perform regular builds of rustc for this target. Currently, all host tools except miri build fine, but I have a patch for libffi-sys to make miri also compile fine for this target that is pending review [1]. While at it, add an option for the musl root for this target. [1]: https://github.com/tov/libffi-rs/pull/100 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-03-17change config.toml to bootstrap.toml for bootstrap modulebit-aloo-10/+10
2025-03-10Target definition for `wasm32-wali-linux-musl` to support the Wasm LinuxArjun Ramesh-0/+5
Interface This commit does not patch libc, stdarch, or cc
2025-03-05replace `rust.description` with `build.description`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-23configure.py: don't instruct user to run nonexistent programнаб-1/+1
$ ./configure configure: processing command line configure: configure: build.configure-args := [] configure: profile := dist configure: configure: writing `config.toml` in current directory configure: configure: run `python /mnt/filling/store/nabijaczleweli/code/rust/x.py --help` This is naturally not valid since I don't have a "python" executable (and this will hopefully become more and more true as Python 2 dies out). ./configure knows this since it does try python3 "$@", then python2.7 &c. After, this now says configure: run `python3 /mnt/filling/store/nabijaczleweli/code/rust/x.py --help` which is possible, and corresponds to the interpreter actually running.
2025-02-12Move `llvm.ccache` to `build.ccache`Jakub Beránek-4/+8
(S)ccache can be useful for more things that just LLVM. For example, we will soon want to use it also for GCC, and theoretically also for building stage0 Rust tools.
2024-12-06Promote powerpc64le-unknown-linux-musl to tier 2 with host toolsJens Reidel-0/+5
MCP: https://github.com/rust-lang/compiler-team/issues/803 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-04Reformat Python code with `ruff`Jakub Beránek-169/+350
2024-11-06bootstrap: add quoting support to avoid splittingEnric Morales-3/+11
With this change, it is now possible to pass quotes to the configure script, such as `./configure.py --set=target.\"thumbv8m.main-none-eabi\".linker=/linker` , which will treat `thumbv8.main-none-eabi` as a whole part. Currently, the string would be split into two elements: `thumbv8`, and `main-none-eabi`.
2024-10-25Allow building rustc's LLVM with Offload supportManuel Drehwald-0/+1
2024-10-19Align boolean option descriptions in `configure.py`clubby789-1/+2
2024-10-02Update helper docs display disable optionAnushrut-1/+1
Updated helper docs via configure.py to make it clearer that users can control options with enable and disable
2024-09-05Enzyme backendManuel Drehwald-0/+1
Co-authored-by: Lorenz Schmidt <bytesnake@mailbox.org>
2024-04-11correct the handling of `bootstrap-cache-path` optiononur-ozkan-1/+3
This change makes `build.bootstrap-cache-path` option to be configurable with `./configure` script, so it can be used like `./configure --bootstrap-cache-path=demo`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-16Rollup merge of #122323 - heiher:loongarch64-musl-root, r=Mark-SimulacrumChris Denton-0/+2
configure.py: add flag for loongarch64 musl-root
2024-03-11Bootstrap: Add argument for building llvm bitcode linkerKjetil Kjeka-0/+2
2024-03-11configure.py: add flag for loongarch64 musl-rootWANG Rui-0/+2
2024-03-05Add a build option to specify the bootstrap cacheLuca Barbato-0/+1
Setting the bootstrap cache path to an external location can help to speed up builds in cases where the build directory is not kept between builds, e.g. in CI or other automated build systems.
2024-03-01Add initial support for DataFlowSanitizerRamon de C Valle-1/+1
Adds initial support for DataFlowSanitizer to the Rust compiler. It currently supports `-Zsanitizer-dataflow-abilist`. Additional options for it can be passed to LLVM command line argument processor via LLVM arguments using `llvm-args` codegen option (e.g., `-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
2023-12-28Remove `--enable-missing-tools` from `configure.py`Jakub Beránek-1/+0
2023-11-09chore(bootstrap): capitalize {error, warning, info, note} tagsonur-ozkan-2/+2
This should enhance the readability. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-02Force mangling version for rustc_codegen_gccGuillaume Gomez-0/+1
2023-10-23Improve android-ndk property interfacePeter Collingbourne-14/+1
PR #105716 added support for NDK r25b, and removed support for r15. Since the switch to r25b would have broken existing r15 users anyway, let's take the opportunity to make the interface more user friendly. Firstly move the android-ndk property to [build] instead of the targets. This is possible now that the NDK has obsoleted the concept of target-specific toolchains. Also make the property take the NDK root directory instead of the "toolchains/llvm/prebuilt/<host tag>" subdirectory.
2023-09-05support `{disable,enable}-patch-binaries-for-nix` in configure.pyonur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-08-02Add more context to `quit_if_file_exists` in `configure.py`Trevor Gross-2/+9
Currently, having a dirty `obj/` directory is sufficient to abort CI tests. This results in errors like the following: ``` ... == end clock drift check == sccache: Starting the server... configure: error: Existing 'config.toml' detected. == clock drift check == ... ``` This is subtle and doesn't give a good idea as to what causes the issue. With this patch, the error becomes more prominent and a resolution is suggested: ``` == end clock drift check == sccache: Starting the server... configure: ERROR: Existing 'config.toml' detected. Exiting Is objdir '/home/tmgross/projects/rust/obj' clean? == clock drift check == ```
2023-07-14put configure behind a groupjyn-0/+4
2023-06-26bootstrap: rename 'user' profile to 'dist'clubby789-1/+1
2023-06-25fix some bugsjyn-1/+3
- fix tests when `--build` is set - don't leak `config.example.toml` fd - don't crash if `config.toml` doesn't exist yet
2023-06-23Fix progress messages for configure in bootstrap_test.pyjyn-1/+1
Before it would unconditionally print `configure-args = []`.
2023-06-16Apply changes to fix python linting errorsTrevor Gross-5/+5
2023-06-03Allow disabling truncation for long config linesjyn-3/+10
2023-04-27fix bug in set argsyukang-1/+1
2023-04-27Fix help message of option for checking Listyukang-4/+3
2023-04-27configure --set support list as argumentsyukang-0/+7
2023-04-25configure.py: add flag for riscv{64,32}gc musl-rootjchzhou-0/+4
2023-04-19Rollup merge of #110541 - jyn514:fix-configure, r=ozkanonurMatthias Krüger-1/+3
Fix various configure bugs Fixes https://github.com/rust-lang/rust/issues/107050. Fixes https://github.com/rust-lang/rust/issues/108928. Closes https://github.com/rust-lang/rust/pull/108641. I recommend reading this commit-by-commit to see the commit descriptions, but the code changes are small. This also changes the README to suggest `configure` instead of `printf`, as well as a few other cleanups described in the commit message.
2023-04-19configure: Set `profile = user` by defaultjyn-0/+2
2023-04-19configure: Fix bug in `configure_top_level_key`jyn-1/+1
Before, it only worked for numbers, not strings.
2023-04-19Changing position of early exit and using standard error method with correct ↵Mads Ravn-4/+4
exit code
2023-04-09'./configure' now checks if 'config.toml' exists before writing to that ↵Mads Ravn-0/+6
destination
2023-03-17Use python3.11 in CI to make sure toml is validatedJoshua Nelson-1/+1
This also fixes a regression from https://github.com/rust-lang/rust/pull/106085 which stopped testing that we support python2 in PR CI.
2023-03-17Add tests for configure.pyJoshua Nelson-198/+219
- Separate out functions so that each unit test doesn't create a file on disk - Add a few unit tests Notably, verifying that we generate valid toml relies on python 3.11 so we can use `tomllib`.
2023-03-11Rename `config.toml.example` to `config.example.toml`Thom Chiovoloni-3/+3