about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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-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
2024-11-01Remove unncessary option for default rust-analyzer settingyukang-0/+1
2024-10-31bootstrap: pass minicore path when running compiletest step许杰友 Jieyou Xu (Joe)-0/+5
2024-10-31bootstrap: pass `--with-{rustc,std}-debug-assertions` to compiletest许杰友 Jieyou Xu (Joe)-21/+26
And rename local variables and field names in bootstrap from `debug_assertions{,_std}` -> `{rustc,std}-debug-assertions` to avoid confusion where applicable.
2024-10-31Use protected symbols when building rustc_driverDavid Lattimore-0/+8
2024-10-31Rollup merge of #132365 - onur-ozkan:less-rustc-overhead, r=KobzolMatthias Krüger-3/+1
pass `RUSTC_HOST_FLAGS` at once without the for loop For obvious reasons...
2024-10-31pass `RUSTC_HOST_FLAGS` at once without the for looponur-ozkan-3/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-28force-recompile library changes on download-rustc="if-unchanged"onur-ozkan-16/+22
This makes download-rustc="if-unchanged" more functional and useful for library developers. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-27simplify force-recompile logic for "library"onur-ozkan-19/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-27don't use absolute paths on `git(Some(self.src))`onur-ozkan-10/+3
It will run at the project root, so resolving absolute/top-level paths is unnecessary. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-25Allow building rustc's LLVM with Offload supportManuel Drehwald-0/+30
2024-10-24Auto merge of #132007 - rustbot:docs-update, r=ehussbors-1/+8
Update books ## rust-lang/edition-guide 7 commits in c7ebae25cb4801a31b6f05353f6d85bfa6feedd1..1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9 2024-10-21 14:29:49 UTC to 2024-10-19 19:08:20 UTC - 2024: Add reserved syntax (rust-lang/edition-guide#326) - Update stdout of `cargo new` (rust-lang/edition-guide#327) - Don't run doctests on rustfmt ident sorting page - add rustfmt raw identifer sorting doc (rust-lang/edition-guide#321) - Add some tips for what to be careful of with rustdoc-doctests (rust-lang/edition-guide#323) - Remove cargo-remove-implicit-features (rust-lang/edition-guide#324) - Rename doctest standalone tag (rust-lang/edition-guide#325) ## rust-embedded/book 1 commits in f40a8b420ec4b4505d9489965e261f1d5c28ba23..ddbf1b4e2858fedb71b7c42eb15c4576517dc125 2024-10-13 19:53:37 UTC to 2024-10-13 19:53:37 UTC - Add link to Cortex-M comparison to install.md (rust-embedded/book#378) ## rust-lang/reference 29 commits in c64e52a3d306eac0129f3ad6c6d8806ab99ae2e9..23ce619966541bf2c80d45fdfeecf3393e360a13 2024-10-05 00:33:03 +0000 to 2024-10-22 21:34:51 +0000 - Mention `--print cfg` under set configuration options (rust-lang/reference#1636) - Fix `pat` fragment specifier to be the "current" edition (rust-lang/reference#1640) - Add restriction for cfg_attr with crate_type and crate_name (rust-lang/reference#1649) - Sort macro fragment specifiers (rust-lang/reference#1641) - Document mixed-site hygiene (rust-lang/reference#1656) - Clarify that "macro attributes" refers to proc macros (rust-lang/reference#1660) - mdbook-spec: Fix Spec::new creation (rust-lang/reference#1658) - Fix stdcall example broken by recent rustc change (rust-lang/reference#1659) - Add spec identifiers to const_eval.md (rust-lang/reference#1569) - Add identifier syntax to trait-bounds.md (rust-lang/reference#1631) - Add identifier syntax to macro-ambiguity.md (rust-lang/reference#1634) - Add spec identifier syntax to conditional-compilation.md (rust-lang/reference#1564) - Add spec identifiers to behaviour-considered-undefined.md (rust-lang/reference#1562) - Add test linking (rust-lang/reference#1646) - Allow `deny` inside `forbid` as a no-op (rust-lang/reference#1655) - Add identifier syntax to identifiers.md (rust-lang/reference#1583) - Add spec identifiers to crates-and-source-files.md (rust-lang/reference#1570) - Add identifier syntax to linkage.md (rust-lang/reference#1633) - Add identifier syntax to type-coercions.md (rust-lang/reference#1632) - Add identifiers to variables.md (rust-lang/reference#1626) - Add identifier syntax to lexer chapters (rust-lang/reference#1620) - Add spec identifier syntax to `unsafe-keyword.md` and `unsafety.md` (rust-lang/reference#1619) - Add identifier syntax to types and subchapters. (rust-lang/reference#1618) - Add identifier syntax to subtyping.md (rust-lang/reference#1613) - Add identifier syntax to statements.md (rust-lang/reference#1611) - Add identifier syntax to type-layout.md (rust-lang/reference#1614) - Clarify definition of "immutable bytes" (rust-lang/reference#1637) - Add preview artifacts in CI (rust-lang/reference#1647) - trait bounds grammar: make `?` and `for&lt;&gt;` mutually exclusive (rust-lang/reference#1650) ## rust-lang/rustc-dev-guide 5 commits in 07bc9ca9eb1cd6d9fbbf758c2753b748804a134f..59d94ea75a0b157e148af14c73c2dd60efb7b60a 2024-10-21 02:30:07 UTC to 2024-10-07 21:12:09 UTC - Add the WASM | WASI | Emscripten notification groups (rust-lang/rustc-dev-guide#2100) - Update bootstrapping.md (rust-lang/rustc-dev-guide#1900) - Rename `needs-profiler-support` to `needs-profiler-runtime` (rust-lang/rustc-dev-guide#2095) - Document compiletest directives `ignore-coverage-map` and `ignore-coverage-run` (rust-lang/rustc-dev-guide#2094) - Purge `run-pass-valgrind` mentions (rust-lang/rustc-dev-guide#2091)
2024-10-23Update rustbook to support new test linking in referenceEric Huss-1/+8
2024-10-23Rollup merge of #132054 - onur-ozkan:cargo-config, r=KobzolLeón Orell Valerian Liehr-3/+0
do not remove `.cargo` directory If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](https://github.com/rust-lang/rust/pull/97513/commits/345eb14f6c841cd38e76a5b0bbf99e1b94a90d40)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxuLeón Orell Valerian Liehr-0/+14
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23Refactor change detection for rustdoc and download-rustcguliwa-66/+23
2024-10-23do not remove `.cargo` directroyonur-ozkan-3/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-22s/display-diff-tool/compiletest-diff-tool/Orion Gonzalez-7/+7
2024-10-22update CONFIG_CHANGE_HISTORYOrion Gonzalez-0/+5
2024-10-22implemented custom differOrion Gonzalez-0/+9
2024-10-22Rollup merge of #132006 - onur-ozkan:131947, r=jieyouxuMatthias Krüger-7/+9
don't stage-off to previous compiler when CI rustc is available Resolves the 4th item in [Tracking Issue for download-rustc improvements](https://github.com/rust-lang/rust/issues/131744).
2024-10-22Rollup merge of #131731 - lucarlig:master, r=onur-ozkanMatthias Krüger-3/+33
add `TestFloatParse` to `tools.rs` for bootstrap add TestFloatParse to tools for bootstrap, I am not sure this is what the issue https://github.com/rust-lang/rust/issues/128012 discussion wants. try-job: aarch64-apple
2024-10-21Rollup merge of #131954 - the8472:bootstrap-parallel-git, r=KobzolJubilee-14/+46
shave 150ms off bootstrap This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification. ``` OLD Benchmark #1: ./x check core Time (mean ± σ): 608.7 ms ± 4.4 ms [User: 368.3 ms, System: 455.1 ms] Range (min … max): 602.3 ms … 618.8 ms 10 runs NEW Benchmark #1: ./x check core Time (mean ± σ): 462.8 ms ± 2.6 ms [User: 350.2 ms, System: 485.1 ms] Range (min … max): 457.5 ms … 465.6 ms 10 runs ``` This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
2024-10-21don't stage-off to previous compiler when CI rustc is availableonur-ozkan-7/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-21bootstrap: move `builder.rs` under `builder/` directory许杰友 Jieyou Xu (Joe)-0/+0
2024-10-21bootstrap: minor docs cleanup许杰友 Jieyou Xu (Joe)-12/+15
2024-10-21bootstrap: extract builder cargo to its own module许杰友 Jieyou Xu (Joe)-1211/+1226
I found builder.rs to be a massive file which made it hard to digest. To make `RUSTFLAGS` usage hardening easier later, I extracted the cargo part in `builder.rs` into its own module.
2024-10-20Rollup merge of #131926 - clubby789:configure-enable, r=KobzolMatthias Krüger-1/+2
Align boolean option descriptions in `configure.py` Boolean options are currently printed as ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ``` as of #131117 imo, this is a little difficult to skim. This PR changes this to align the `OR`s and push the description onto a newline: ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ```
2024-10-20Rollup merge of #131647 - jieyouxu:unicode-table-generator, r=Mark-SimulacrumMatthias Krüger-0/+24
Register `src/tools/unicode-table-generator` as a runnable tool It seems like `src/tools/unicode-table-generator` is not currently managed by bootstrap. This PR wires it up with bootstrap as a runnable tool. This tool seems to take two possible args: 1. (Mandatory) path to `library/core/src/unicode/unicode_data.rs`, and 2. (Optional) path to generate a test file. I only passed the mandatory path to `unicode_data.rs` in bootstrap and didn't do anything about (2). I'm not sure about how this tool is supposed to be run. `Cargo.lock` is modified because I renamed `unicode-table-generator`'s bin name to match the tool name, as bootstrap's tool running logic expects the bin name to be derived from the tool name. I also added a triagebot message to remind to not manually edit the library source file and edit the tool then regenerate instead, but this should probably be a tidy check (if that's desirable then that can be in a follow-up PR, though may be overkill). Helps with #131640 but does not close it because still no docs. r? `@Mark-Simulacrum` (since I think you authored this tool?)
2024-10-20Rollup merge of #131365 - heiseish:fix-issue-101993, r=Mark-SimulacrumMatthias Krüger-4/+39
Fix missing rustfmt in msi installer #101993 # Context - Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer - Fixed missing `rustfmt` for apple darwin installer - Closes #101993 r​? `@jyn514` - Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs. - I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference - Will push fixes for linting later
2024-10-20add TestFloatParse to tools for bootstraplucarlig-3/+33
2024-10-20run git commands in bootstrap in parallelThe 8472-14/+46
this saves about 150ms on many ./x invocations
2024-10-19Align boolean option descriptions in `configure.py`clubby789-1/+2
2024-10-19bootstrap: allow setting `--jobs` in config.toml许杰友 Jieyou Xu (Joe)-3/+68
2024-10-15Fix `clippy::needless-lifetimes` in bootstrapJosh Stone-7/+7
2024-10-15update STAGE0_MISSING_TARGETSJosh Stone-4/+0
2024-10-15fix missing rustfmt for apple darwinGiang Dao-3/+9
2024-10-15fix missing rustfmt and clippy for msiGiang Dao-1/+30
2024-10-15Fix most ui tests on emscripten targetHood Chatham-0/+3
To fix the linker errors, we need to set the output extension to `.js` instead of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to be `node` as well. This fixes most of the ui tests. I fixed a few more tests with simple problems: - `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` -- Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of `mod m`. - `issues/issue-12699.rs` -- Seems to hang so I disabled it - `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I disabled it