about summary refs log tree commit diff
path: root/src/bootstrap/configure.py
AgeCommit message (Collapse)AuthorLines
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
2023-03-07Rollup merge of #108619 - jyn514:llvm-version-check, r=cuviperYuki Okushi-1/+0
Remove the option to disable `llvm-version-check` We don't support old versions of LLVM; there's no reason to have an easy way to force bootstrap to use them anyway. If someone really needs to use an unsupported version, they can modify bootstrap to change the version range. r? ``@cuviper`` on whether we want to do this or not, since you maintain rust on Fedora and touched this config last.
2023-03-05Remove the option to disable `llvm-version-check`Joshua Nelson-1/+0
We don't support old versions of LLVM; there's no reason to have an easy way to force bootstrap to use them anyway. If someone really needs to use an unsupported version, they can modify bootstrap to change the version range.
2023-03-04Rollup merge of #108632 - Teapot4195:issue-108612-fix, r=ozkanonurMatthias Krüger-4/+18
Omit unchanged options from config.toml in `configure.py` Leaves section tags, but removes options that are unchanged. Change in `config.toml.example` is to prevent comments from sneaking in by being directly after a section tag closes #108612
2023-03-03./configure script should only show blocks (and associated comments) where ↵Alex Huang-4/+18
it is not default
2023-03-02Allow setting hashmap toml values in `./configure`KittyBorgX-0/+2
2023-02-19Removed trailing spaces to satisfy lintlionelllohcd-11/+10
2023-02-18[107049] Recognise top level keys in config.toml.examplelionelllohcd-5/+22
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2022-12-29Respect --set=target.platform during buildMarcus Calhoun-Lopez-1/+3
Avoid quoting targets that do not contain a period. See https://github.com/rust-lang/rust/commit/1532fd8cd0db93f469e414f9da31ef083a44fcba `--set=target.platform.linker` is ignored if RUSTFLAGS is not set. Undo parts of https://github.com/rust-lang/rust/commit/d1291dc8b4ac9a98ff1d286402559e4ba5d68488
2022-07-10Remove unsupported options in configure.pyJoshua Nelson-5/+2
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.
2022-05-22Quote replace target in bootstrap configureyue4u-1/+1
2022-03-10configure: don't serialize empty array elementsJon Gjengset-0/+4
Before this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = [''] After this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = []
2021-10-12Add --enable-debug-assertions-std option to configure script.Hans Kratz-0/+1
2021-10-12Add --enable-overflow-checks-std option to configure script.Hans Kratz-0/+1
2021-08-06Add options for enabling overflow checks in rustc and std.Hans Kratz-0/+1
The options are `overflow-checks` and `overflow-checks-std` defaulting to false.
2021-07-31add two new build flags to build clang and enable llvm pluginsManuel Drehwald-0/+2
2021-07-19add --codegen-backends=foo,bar ./configure flagPietro Albini-0/+3
Unfortunately this requires a proper ./configure flag, as the codegen backends config entry is a list, not a string (breaking --set).
2021-04-07Cleanup option parsing and config.toml.exampleJoshua Nelson-1/+6
- Add an assertion that `link-shared = true` when `thin-lto = true`. Previously, link-shared would be silently overwritten. - Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults immediately instead of delaying until later in bootstrap. This makes it easier to find what the default value is. - Remove redundant `config.x = false` when the default was already false - Set defaults for `bindir` in `default_opts()` instead of `parse()` - Update `download-ci-llvm = if-supported` option to match bootstrap.py - Remove redundant check for link_shared. Previously, it was checked twice. - Update various options in config.toml.example to their defaults. Previously, some options showed an example value instead of the default value. - Fix incorrect defaults in config.toml.example + `use-libcxx` defaults to false + Add missing `check-stage = 0` + Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`) - Remove redundant defaults in prose - Use the same comment for the default and target-dependent `musl-root` - Fix typos - Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated. - Update more defaults to better reflect how they actually get set - Remove ignored `gpg-password-file` option This stopped being used in https://github.com/rust-lang/rust/commit/7704d35accfe1b587ce41ea09ca3bf6a47aca117, but was never removed from config.toml. - Remove unused flags from `config.toml` + Disallow `infodir` and `localstatedir` in `config.toml` + Allow the flags in `./configure`, but give a warning that they will be ignored. + Fix incorrect comment that `datadir` will be ignored. Example output: ``` $ ./configure --set install.infodir=xxx configure: processing command line configure: configure: install.infodir := xxx configure: build.configure-args := ['--set', 'install.infodir=xxx'] warning: infodir will be ignored configure: configure: writing `config.toml` in current directory configure: configure: run `python /home/joshua/rustc3/x.py --help` configure: ``` - Update CHANGELOG - Add "as an example" where appropriate - Link to an issue instead of to ephemeral chats
2021-02-07HWASan supportTri Vo-1/+1
2020-12-29bootstrap: add the dist.compression-formats optionPietro Albini-0/+4
The option allows to add or remove compression formats used while producing dist tarballs.
2020-11-16x.py: allow a custom string appended to the versionJosh Stone-0/+1
This adds `rust.description` to the config as a descriptive string to be appended to `rustc --version` output, which is also used in places like debuginfo `DW_AT_producer`. This may be useful for supplementary build information, like distro-specific package versions. For example, in Fedora 33, `gcc --version` outputs: gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) With this change, we can add similar vendor info to `rustc --version`.
2020-11-05Infer the default host target from the host toolchain if possibleJoshua Nelson-1/+1
This fixes ongoing issues where x.py will detect the wrong host triple between MSVC and GNU. - Add line to changelog
2020-10-21allow using the system-wide llvm-libunwind as the unwinderMarc-Antoine Perennou-1/+1
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-06-09Add a disabled builder for riscv64 emulated testsTom Eccles-0/+2
This will run all tests for `riscv64gc-unknown-linux-gnu` in a QEMU instance. This is based upon the armhf QEMU test image.
2020-05-10remove lldb package from bootstrap, config and build-manifestRalf Jung-1/+0
it's not been built since a long time ago
2020-02-17configure: set LLVM flags with a valueJosh Stone-3/+3
Rather than a boolean `--enable-cflags` etc., these options should reflect that they are for LLVM, and that they need a value. You would now use `./configure --llvm-cflags="..."`.
2020-02-12Rollup merge of #68947 - chrissimpkins:python-fmt, r=alexcrichtonYuki Okushi-5/+6
Python script PEP8 style guide space formatting and minor Python source cleanup This PR includes the following changes in the Python sources based on a flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.6 on Darwin lint: - PEP8 style guide spacing updates *without* line length changes - removal of unused local variable assignments in context managers and exception handling - removal of unused Python import statements - removal of unnecessary semicolons