Commit Graph

133 Commits

Author SHA1 Message Date
bit-aloo
1954494ec9 change config.toml to bootstrap.toml for bootstrap module 2025-03-17 12:56:41 +05:30
Arjun Ramesh
336a327f7c Target definition for wasm32-wali-linux-musl to support the Wasm Linux
Interface

This commit does not patch libc, stdarch, or cc
2025-03-10 21:26:45 -04:00
onur-ozkan
9646c2f642 replace rust.description with build.description
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:56 +03:00
наб
097d64205a configure.py: don't instruct user to run nonexistent program
$ ./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-23 19:11:37 +01:00
Jakub Beránek
e663819856 Move llvm.ccache to build.ccache
(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.
2025-02-12 20:30:27 +01:00
Jens Reidel
68ce6596ec Promote powerpc64le-unknown-linux-musl to tier 2 with host tools
MCP: https://github.com/rust-lang/compiler-team/issues/803

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-06 04:35:21 +01:00
Jakub Beránek
536516f949 Reformat Python code with ruff 2024-12-04 23:03:44 +01:00
Enric Morales
8471c6bb0c bootstrap: add quoting support to avoid splitting
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-11-06 21:03:02 +01:00
Manuel Drehwald
e2d3f5aaec Allow building rustc's LLVM with Offload support 2024-10-25 14:31:09 -07:00
clubby789
28fce83cc6 Align boolean option descriptions in configure.py 2024-10-19 13:02:37 +00:00
Anushrut
9de4b62faf Update helper docs display disable option
Updated helper docs via configure.py to make it clearer that users can control options with enable and disable
2024-10-02 01:47:18 +05:30
Manuel Drehwald
4f5c16d62f Enzyme backend
Co-authored-by: Lorenz Schmidt <bytesnake@mailbox.org>
2024-09-05 22:47:23 -04:00
onur-ozkan
bd479113d3 correct the handling of bootstrap-cache-path option
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-04-11 14:57:10 +03:00
Chris Denton
9870116309 Rollup merge of #122323 - heiher:loongarch64-musl-root, r=Mark-Simulacrum
configure.py: add flag for loongarch64 musl-root
2024-03-16 18:27:32 +00:00
Kjetil Kjeka
6a50d059a5 Bootstrap: Add argument for building llvm bitcode linker 2024-03-11 13:35:55 +01:00
WANG Rui
2f84c7610f configure.py: add flag for loongarch64 musl-root 2024-03-11 11:28:34 +08:00
Luca Barbato
c98e25bab9 Add a build option to specify the bootstrap cache
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-05 10:35:43 +01:00
Ramon de C Valle
dee4e02102 Add initial support for DataFlowSanitizer
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`).
2024-03-01 18:50:40 -08:00
Jakub Beránek
8763f7ae7d Remove --enable-missing-tools from configure.py 2023-12-28 16:08:39 +01:00
onur-ozkan
d1e26401bc chore(bootstrap): capitalize {error, warning, info, note} tags
This should enhance the readability.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 09:22:43 +03:00
Guillaume Gomez
a1902a81d9 Force mangling version for rustc_codegen_gcc 2023-11-02 21:03:27 +01:00
Peter Collingbourne
aad44b3b54 Improve android-ndk property interface
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-10-23 12:15:20 -07:00
onur-ozkan
d454cab405 support {disable,enable}-patch-binaries-for-nix in configure.py
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-05 13:19:08 +03:00
Trevor Gross
8a2022b108 Add more context to quit_if_file_exists in configure.py
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-08-02 04:38:16 -04:00
jyn
9851a141a3 put configure behind a group 2023-07-14 17:27:20 -05:00
clubby789
85c4ea0138 bootstrap: rename 'user' profile to 'dist' 2023-06-26 22:54:47 +00:00
jyn
1e7f03718b fix some bugs
- 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-25 10:01:04 -05:00
jyn
7d2373e48f Fix progress messages for configure in bootstrap_test.py
Before it would unconditionally print `configure-args = []`.
2023-06-23 21:12:06 -05:00
Trevor Gross
22d00dcd47 Apply changes to fix python linting errors 2023-06-16 20:56:01 -04:00
jyn
3591a1239c Allow disabling truncation for long config lines 2023-06-03 11:29:21 -05:00
yukang
787f3fea15 fix bug in set args 2023-04-27 00:32:01 +08:00
yukang
589877cef1 Fix help message of option for checking List 2023-04-27 00:15:56 +08:00
yukang
89566d5a9b configure --set support list as arguments 2023-04-27 00:15:55 +08:00
jchzhou
d2516c1191 configure.py: add flag for riscv{64,32}gc musl-root 2023-04-25 01:20:28 +08:00
Matthias Krüger
0820e31a00 Rollup merge of #110541 - jyn514:fix-configure, r=ozkanonur
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-19 17:54:44 +02:00
jyn
b7607a9113 configure: Set profile = user by default 2023-04-19 09:50:21 -05:00
jyn
6d07dbc266 configure: Fix bug in configure_top_level_key
Before, it only worked for numbers, not strings.
2023-04-19 08:25:49 -05:00
Mads Ravn
010d7975d6 Changing position of early exit and using standard error method with correct exit code 2023-04-19 14:58:53 +02:00
Mads Ravn
9aa3f053d7 './configure' now checks if 'config.toml' exists before writing to that destination 2023-04-09 22:50:42 +02:00
Joshua Nelson
c7eccdaaee Use python3.11 in CI to make sure toml is validated
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-17 10:52:51 -05:00
Joshua Nelson
d808bc296d Add tests for configure.py
- 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-17 10:24:40 -05:00
Thom Chiovoloni
fcb2a3665f Rename config.toml.example to config.example.toml 2023-03-11 14:10:00 -08:00
Yuki Okushi
a7b9488599 Rollup merge of #108619 - jyn514:llvm-version-check, r=cuviper
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-07 23:06:21 +09:00
Joshua Nelson
8becfed1c9 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.
2023-03-05 14:42:15 +00:00
Matthias Krüger
538f19d638 Rollup merge of #108632 - Teapot4195:issue-108612-fix, r=ozkanonur
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-04 20:48:17 +01:00
Alex Huang
00f98e6810 ./configure script should only show blocks (and associated comments) where it is not default 2023-03-03 17:27:29 -05:00
KittyBorgX
a6580baa6c Allow setting hashmap toml values in ./configure 2023-03-02 19:00:26 +05:30
lionelllohcd
5643706ca2 Removed trailing spaces to satisfy lint 2023-02-19 23:51:17 -08:00
lionelllohcd
960ac2e07f [107049] Recognise top level keys in config.toml.example 2023-02-18 23:36:51 -08:00
Albert Larsan
40ba0e84d5 Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00