summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-01-23make it possible to use ci-rustc on tarball sourcesonur-ozkan-13/+23
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure the commit has to download precompiled rustc artifact from CI, which was leading builds to fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on git-managed source and read `git-commit-hash` file otherwise. Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit 903cddb392bc9a5bc43194bcbb8b031f2fcc2c56)
2025-01-23resolve symlinks of LLVM tool binaries before copying themonur-ozkan-1/+15
There is a chance that these tools are being installed from an external LLVM and we have no control over them. If any of these tools use symlinks, they will fail during tarball distribution. This change makes copying process to resolve symlinks just before placing them into the destination path. Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit cde58dd5f781c3998d2421132854d2a833937e85)
2025-01-23Add logic to override profile for non git sourcesTanvi Pooranmal Meena-5/+8
(cherry picked from commit 7d806171d00f53a720e6784a878a98cbef5c3d4a)
2025-01-23Only dist `llvm-objcopy` if llvm tools are enabledJosh Stone-1/+1
(cherry picked from commit 4c6d793c66993a0f5455f35e73a1549d232c3ae5)
2024-11-26Revert "fix missing rustfmt for apple darwin"Boxy-9/+3
This reverts commit 2316749ca954030afed6145342808a8c1ae29fac.
2024-11-26Revert "fix missing rustfmt and clippy for msi"Boxy-30/+1
This reverts commit f5577a8174685aca342b9189e625648f25a23a20.
2024-11-21aix: fix archive formatHenry Jiang-15/+31
fmt fix cfg for windows remove unused imports address comments update libc to 0.2.164 fmt remove unused imports
2024-11-19Register change infoJieyou Xu-0/+5
2024-11-19Default-enable `llvm_tools_enabled` when no `config.toml` is presentJieyou Xu-0/+4
2024-11-13fix clippy warns on windows (not checked by CI)klensy-1/+3
2024-11-13fix testsklensy-11/+13
2024-11-13define all the clippy lints we check in CI in a stepPietro Albini-0/+69
2024-11-13store the lint levels in the clippy structs themselvesPietro Albini-20/+40
2024-11-13disable precompiled rustc for "library" and "compiler" profilesonur-ozkan-0/+2
There is an ongoing discussion about this on Zulip and for now we want to keep these disabled. Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/.60download-rustc.20.3D.20'if-unchanged'.60.20for.20.60compiler.60.20profile.3F Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-13handle channel info before handling git infoonur-ozkan-6/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-13Reapply "Rollup merge of #132772 - onur-ozkan:download-rustc-default, ↵onur-ozkan-31/+34
r=jieyouxu" This reverts commit c0cee4e36b5f0964bdeb2ac12cfd9002addb51cc.
2024-11-12Auto merge of #132954 - matthiaskrgr:rollup-x3rww9h, r=matthiaskrgrbors-23/+57
Rollup of 7 pull requests Successful merges: - #131831 (extend the "if-unchanged" logic for compiler builds) - #132541 (Proper support for cross-crate recursive const stability checks) - #132657 (AIX: add run-make support) - #132901 (Warn about invalid `mir-enable-passes` pass names) - #132923 (Triagebot: Consolidate the T-compiler ad hoc assignment groups) - #132938 (Make precise capturing suggestion machine-applicable only if it has no APITs) - #132947 (clarify `must_produce_diag` ICE for debugging) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-12Rollup merge of #131831 - onur-ozkan:improve-rustc-if-unchanged-logic, ↵Matthias Krüger-23/+57
r=Mark-Simulacrum extend the "if-unchanged" logic for compiler builds Implements the first item from [this tracking issue](https://github.com/rust-lang/rust/issues/131744). In short, we want to make "if-unchanged" logic to check for changes outside of certain allowed directories, and this PR implements that. See https://github.com/rust-lang/rust/issues/131658 for more context.
2024-11-12Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillotbors-19/+13
Delete the `cfg(not(parallel))` serial compiler Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon! #113349 Note that the default is still 1 thread, as more than 1 thread is still fairly broken. cc `@onur-ozkan` to see if i did the bootstrap field removal correctly, `@SparrowLii` on the sync parts
2024-11-12Delete the `cfg(not(parallel))` serial compilerNoratrieb-19/+13
Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon!
2024-11-12Rollup merge of #132771 - ↵Matthias Krüger-0/+47
ismailarilik:test/configure/cover-parse-args-in-src-bootstrap-configure-py, r=onur-ozkan test(configure): cover `parse_args` in `src/bootstrap/configure.py` I was reading `src/bootstrap/configure.py` and `parse_args` function there seems complex. So I added some tests to cover it and prevent regressions.
2024-11-12test(configure): cover `parse_args` in `src/bootstrap/configure.py`ismailarilik-0/+47
2024-11-11Auto merge of #132902 - matthiaskrgr:rollup-43qgg3t, r=matthiaskrgrbors-1/+18
Rollup of 4 pull requests Successful merges: - #129627 (Ensure that tail expr receive lifetime extension) - #130999 (Implement file_lock feature) - #132873 (handle separate prefixes in clippy rules) - #132891 (Remove `rustc_session::config::rustc_short_optgroups`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-11Auto merge of #132720 - jieyouxu:do-not-strip, r=davidtwcobors-3/+7
Only copy, rename and link `llvm-objcopy` if llvm tools are enabled Fixes #132719. cc `@bjorn3` who reported the bootstrapping problem for cg_clif. cc `@davidtwco` in case this might be problematic for linux -> macOS cross-compile builds, but seems very unlikely. cc `@albertlarsan68` (co-reviewed #131405) r? bootstrap
2024-11-11move `src/tools/build_helper` into `src/build_helper`onur-ozkan-5/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-11reduce `RUSTC_IF_UNCHANGED_ALLOWED_PATHS` significantlyonur-ozkan-33/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10warn about "src/bootstrap" on `RUSTC_IF_UNCHANGED_ALLOWED_PATHS`onur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10add test coverage for `RUSTC_IF_UNCHANGED_ALLOWED_PATHS`onur-ozkan-2/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10use allowed "if-unchanged" logic for compiler buildsonur-ozkan-17/+65
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10add test coverage for separate clippy prefixesonur-ozkan-0/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10handle separate prefixes in clippy argsonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10Revert "Rollup merge of #132772 - onur-ozkan:download-rustc-default, r=jieyouxu"Jieyou Xu-35/+32
This reverts commit c435fa8c4b55f0f8ef8e2e839ce7de960613267e, reversing changes made to 88acd493f9dbbc8228db2b123c9b4132a995de92. Seems to have unintentionally omitted commit hash leading to <https://github.com/rust-lang/rust/pull/132772>.
2024-11-09Rollup merge of #132772 - onur-ozkan:download-rustc-default, r=jieyouxuMatthias Krüger-32/+35
use `download-rustc="if-unchanged"` as a global default If `download-rustc` isn't explicitly set and the source is Git-managed, it should be totally okay to utilize "if-unchanged" behaviour. The "dist" profile already sets `download-rustc` to `false`, so this shouldn’t impact anything on CI. This also resolves an unhandled case where `bootstrap` unexpectedly panics if `"if-unchanged"` was used with a non-Git source. Now we exits gracefully with an error message pointing the problem.
2024-11-08fix `core::config::tests::override_toml`onur-ozkan-0/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08respect to global `download-rustc` default in non-dist profilesonur-ozkan-8/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08use `download-rustc="if-unchanged"` as default whenever possibleonur-ozkan-3/+13
"whenever possible" means applying it if `download-rustc` isn't explicitly set and the source is Git-managed. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08read repository information configs at an earlier stageonur-ozkan-21/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-07Rollup merge of #132737 - clubby789:lock-no-pid, r=jieyouxuJubilee-2/+6
bootstrap: Print better message if lock pid isn't available Not actually sure why, but sometimes the PID isn't available so we print ``` WARNING: build directory locked by process , waiting for lock ``` This makes the message a bit nicer in this case
2024-11-07Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkanJubilee-21/+26
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing. cc ````@matthiaskrgr```` Closes #123987. r? bootstrap (or compiler tbh)
2024-11-07bootstrap: Print better message if lock pid isn't availableclubby789-2/+6
2024-11-07Only copy, rename and link `llvm-objcopy` if llvm tools are enabledJieyou Xu-3/+7
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2024-11-07Auto merge of #132635 - kiike:fix/dots_in_target, r=onur-ozkanbors-3/+11
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` or `./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`. The approach taken is to perform custom splitting instead of using `str.split()` and then repairing the split. Also, There are numerous corner cases not handled: the custom split doesn't differentiate between single quotes or double quotes, so it is perfectly possible to pass `./configure.py --set=target.\"thumbv8m.main-none-eabi\'.linker=/linker` and the behaviour would be the same as with all double quotes or single quotes. As for the code, i'm unsure on whether to delimit strings with double or single quotes. I've seen both single quotes and double quotes used to delimit strings, like in ```py err("Option '{}' provided more than once".format(key)) ``` and this a handful of lines down: ```py if option.name == 'sccache': set('llvm.ccache', 'sccache', config) ``` Please advise on the wanted one. Fixes #130602 r? `@onur-ozkan` Thanks in advance for the feedback!
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-11-05bootstrap: include `llvm-objcopy` in distDavid Wood-6/+24
2024-11-03Call the target libdir target libdirNilstrieb-30/+41
Because it's the target libdir. `--print` uses the same terminology, and it's a simple way to make it obviously different from `$sysroot/lib`.
2024-11-02Rollup merge of #132494 - onur-ozkan:library-profile-default, r=jieyouxuMatthias Krüger-1/+9
make `download-rustc="if-unchanged"` default for library profile Since `download-rustc` is tested on CI and https://github.com/rust-lang/rust/pull/132267 makes it effective for library development, we can now make it default for the library profile. Implements the 3rd item from [this tracking issue](https://github.com/rust-lang/rust/issues/131744).
2024-11-02add change entry for library profile updateonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-02make `download-rustc="if-unchanged"` default for library profileonur-ozkan-1/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-02Rollup merge of #132438 - chenyukang:yukang-fix-analyzer_settings, r=jieyouxuGuillaume Gomez-0/+1
Remove unncessary option for default rust-analyzer setting In favor of https://github.com/rust-lang/rust-analyzer/pull/17888
2024-11-01Auto merge of #131634 - davidlattimore:lld-protected, r=Kobzolbors-0/+8
Use protected visibility when building rustc with LLD https://github.com/rust-lang/compiler-team/issues/782 I wasn't sure about having two commits in a PR, but I figured, at least initially it might make sense to discuss these commits together. Happy to squash, or move the second commit to a separate PR. I contemplated trying to enable protected visibility for more cases when LLD will be used other than just `-Zlinker-features=+lld`, but that would be more a complex change that probably still wouldn't cover all cases when LLD is used, so went with the simplest option of just checking if the linker-feature is enabled. r? lqd