about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-12-27compiletest: Replace `--nocapture` with `--no-capture`clubby789-1/+1
2024-12-27Add `--no-capture` as a bootstrap argumentclubby789-0/+16
2024-12-26Strip debuginfo from rustc-main and rustdocclubby789-2/+13
2024-12-26replace bootstrap-self-test feature flag with cfg(test)onur-ozkan-22/+19
This makes it in more rusty way. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-24Auto merge of #134724 - onur-ozkan:type-improvements, r=jieyouxubors-53/+34
improve type mutation for certain structures self-explanatory
2024-12-24improve type mutation for certain structuresonur-ozkan-53/+34
self-explanatory Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-23Auto merge of #134405 - rmehri01:x-completions, r=onur-ozkanbors-2/+13
Generate shell completions for x as well It would be nice to be have shell completions for both `./x` and `x` (installed with `cargo install --path src/tools/x`) instead of just `x.py`. This pr generates the corresponding completions for each shell in a similar way to `x.py` but under `x.<shell>` instead.
2024-12-20fix missing ns units in bootstrap's benchmark renderingThe 8472-1/+1
2024-12-19Rollup merge of #134437 - onur-ozkan:improve-compiler-build, r=jieyouxu许杰友 Jieyou Xu (Joe)-30/+34
reduce compiler `Assemble` complexity `compile::Assemble` is already complicated by its nature (as it handles core internals like recursive building logic, etc.) and also handles half of `LldWrapper` tool logic for no good reason since it should be done in the build step directly. This change moves it there to reduce complexity of `compile::Assemble` logic.
2024-12-18reduce compiler `Assemble` complexityonur-ozkan-30/+34
`compile::Assemble` is already complicated by its nature (as it handles core internals like recursive building logic, etc.) and also handles half of `LldWrapper` tool logic for no good reason since it should be done in the build step directly. This change moves it there to reduce complexity of `compile::Assemble` logic. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-18Rollup merge of #134444 - jyn514:cranelift-std, r=bjorn3许杰友 Jieyou Xu (Joe)-0/+5
Fix `x build --stage 1 std` when using cg_cranelift as the default backend Before, cg_cranelift would ICE when trying to lower f16 and f128. The library/ crates had all the infrastructure to omit using them, it just wasn't hooked up to bootstrap. r? `````@bjorn3`````
2024-12-18Rollup merge of #134420 - Integral-Tech:pathbuf-refactor, r=compiler-errors许杰友 Jieyou Xu (Joe)-7/+5
refactor: replace &PathBuf with &Path to enhance generality - According to [style.md](https://github.com/rust-lang/rust/blob/master/src/tools/rust-analyzer/docs/dev/style.md#useless-types): > More generally, always prefer types on the left ```rust // GOOD BAD &[T] &Vec<T> &str &String Option<&T> &Option<T> &Path &PathBuf ```
2024-12-17Fix `x build --stage 1 std` when using cg_cranelift as the default backendjyn-0/+5
Before, cg_cranelift would ICE when trying to lower f16 and f128. The library/ crates had all the infrastructure to omit using them, it just wasn't hooked up to bootstrap.
2024-12-17Rollup merge of #134423 - jieyouxu:bootstrap-test-valid, r=onur-ozkanMatthias Krüger-1/+1
bootstrap: use specific-purpose ui test path for `test_valid` self-test I wanted to move some ui tests around in #134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically. r? bootstrap
2024-12-17Rollup merge of #133801 - Gelbpunkt:powerpc64le-unknown-linux-musl-tier-2, ↵Matthias Krüger-0/+6
r=jieyouxu,Urgau,Kobzol Promote powerpc64le-unknown-linux-musl to tier 2 with host tools MCP: https://github.com/rust-lang/compiler-team/issues/803 I'm using crosstool-ng for building a toolchain because GCC 9 from `musl-toolchain.sh` has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target. The resulting compiler works fine, built with `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux` and tested on Alpine Linux in a VM and on a bare metal POWER8 machine: ``` qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'rust-std-powerpc64le-unknown-linux-musl' install: installing component 'cargo' install: installing component 'rustfmt-preview' install: installing component 'rls-preview' install: installing component 'rust-analyzer-preview' install: installing component 'llvm-tools-preview' install: installing component 'clippy-preview' install: installing component 'miri-preview' install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl' install: installing component 'llvm-bitcode-linker-preview' install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error rust installed. qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs qemu-ppc64le:~$ rustc test.rs qemu-ppc64le:~$ ./test hello world qemu-ppc64le:~$ file test test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped ``` try-job: dist-powerpc64le-linux
2024-12-17Generate shell completions for x as wellRyan Mehri-2/+13
2024-12-18refactor: replace &PathBuf with &Path to enhance generalityIntegral-7/+5
2024-12-17bootstrap: use specific-purpose ui test path许杰友 Jieyou Xu (Joe)-1/+1
I wanted to move some ui tests around, which broke `test_valid` since it was referencing a non-specific-purpose ui test.
2024-12-17clarify that path() is for on-disk pathsRalf Jung-1/+3
2024-12-17bootstrap: fix a commentRalf Jung-1/+1
2024-12-15bootstrap: make ./x test error-index workRalf Jung-1/+3
2024-12-14Auto merge of #134296 - matthiaskrgr:rollup-o0sxozj, r=matthiaskrgrbors-0/+10
Rollup of 6 pull requests Successful merges: - #132150 (Fix powerpc64 big-endian FreeBSD ABI) - #133942 (Clarify how to use `black_box()`) - #134081 (Try to evaluate constants in legacy mangling) - #134192 (Remove `Lexer`'s dependency on `Parser`.) - #134208 (coverage: Tidy up creation of covmap and covfun records) - #134211 (On Neutrino QNX, reduce the need to set archiver via environment variables) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-14Rollup merge of #134211 - flba-eb:add_qnx_archiver, r=compiler-errorsMatthias Krüger-0/+10
On Neutrino QNX, reduce the need to set archiver via environment variables This adds support for automatically selecting the correct `ar` tool when compiling for Neutrino QNX. Once https://github.com/rust-lang/cc-rs/pull/1319 is merged and a new cc version is integrated, all environment variables of the [Neutrino documentation](https://github.com/rust-lang/rust/blob/stable/src/doc/rustc/src/platform-support/nto-qnx.md) can be removed. CC: ````````@jonathanpallant```````` ````````@japaric```````` ````````@gh-tr```````` ````````@AkhilTThomas````````
2024-12-14Rollup merge of #134240 - cuviper:dist-llvm-tools, r=jieyouxuMatthias Krüger-1/+1
Only dist `llvm-objcopy` if llvm tools are enabled This uses the same condition that #132720 added in the compilation phase. r? ``@jieyouxu``
2024-12-14Rollup merge of #134209 - onur-ozkan:check-skip-paths, r=jieyouxuMatthias Krüger-1/+25
validate `--skip` and `--exclude` paths Fixes #134198 cc ``@ChrisDenton``
2024-12-13Auto merge of #133899 - scottmcm:strip-mir-debuginfo, r=oli-obkbors-0/+5
We don't need `NonNull::as_ptr` debuginfo In order to stop pessimizing the use of local variables in core, skip debug info for MIR temporaries in tiny (single-BB) functions. For functions as simple as this -- `Pin::new`, etc -- nobody every actually wants debuginfo for them in the first place. They're more like intrinsics than real functions, and stepping over them is good.
2024-12-13validate `--skip` and `--exclude` pathsonur-ozkan-1/+25
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-12Only dist `llvm-objcopy` if llvm tools are enabledJosh Stone-1/+1
2024-12-12Rollup merge of #134207 - jieyouxu:revert-134040, r=lqdMatthias Krüger-153/+149
Revert "bootstrap: print{ln}! -> eprint{ln}! (take 2) #134040" Unfortunately, #134040 is proving to have caused more output interleaving problems that are tricky to diagnose and fix, and I think we probably should leave these untouched as bootstrap and compiletest has a bunch of interconnecting parts, and the commands and tools that they exercise do not consistently use stderr/stdout either. This causes hard-to-diagnose output interleaving bugs, which unfortunately degrades contributor experience. This PR reverts two PRs in order to cleanly revert #134040: 1. Revert #134123 which is a fix-forward after #134040. 2. Revert #134040 itself. I don't regret the initial effort `@clubby789,` and thank you for making the attempts, but I think we need to refrain from touching too many of these at once because some of the interleaving are very non-obvious and we don't have test coverage for. r? `@clubby789` cc `@Zalathar`
2024-12-12Reduce the need to set archiver via environment variablesFlorian Bartels-0/+10
2024-12-12Revert "Rollup merge of #134040 - clubby789:bootstrap-eprintln, r=jieyouxu"许杰友 Jieyou Xu (Joe)-154/+150
This reverts commit b282774aaf0aa05b4a9855d973b67e7e424c2136, reversing changes made to e0f3db0056288a06b1ae36cdd70741a4e0b3584a.
2024-12-12Revert "Rollup merge of #134123 - Zalathar:json-output, r=jieyouxu,clubby789"许杰友 Jieyou Xu (Joe)-1/+1
This reverts commit c42c248009747366e646a3ad1ce6e8f815ea7db2, reversing changes made to 0f1b827881d20ba08f72d692ccd3ff97a0e25851.
2024-12-12Rollup merge of #134173 - onur-ozkan:allow-symbol-intern-string-literal, ↵Matthias Krüger-6/+1
r=jieyouxu allow `symbol_intern_string_literal` lint in test modules Since #133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons). Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands. This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
2024-12-11remove `Kind` check for `symbol_intern_string_literal`onur-ozkan-6/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-10Auto merge of #134125 - fmease:rollup-u38o3ob, r=fmeasebors-13/+20
Rollup of 11 pull requests Successful merges: - #133478 (jsondocck: Parse, don't validate commands.) - #133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - #133970 ([AIX] Replace sa_sigaction with sa_union.__su_sigaction for AIX) - #133980 ([AIX] Remove option "-n" from AIX "ln" command) - #134008 (Make `Copy` unsafe to implement for ADTs with `unsafe` fields) - #134017 (Don't use `AsyncFnOnce::CallOnceFuture` bounds for signature deduction) - #134023 (handle cygwin environment in `install::sanitize_sh`) - #134041 (Use SourceMap to load debugger visualizer files) - #134065 (Move `write_graphviz_results`) - #134106 (Add compiler-maintainers who requested to be on review rotation) - #134123 (bootstrap: Forward cargo JSON output to stdout, not stderr) Failed merges: - #134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-10Rollup merge of #134123 - Zalathar:json-output, r=jieyouxu,clubby789León Orell Valerian Liehr-1/+1
bootstrap: Forward cargo JSON output to stdout, not stderr This fixes the RA errors I've been seeing on proc-macros after the re-landing of #134040. r? clubby789
2024-12-10Rollup merge of #134023 - onur-ozkan:132507, r=jieyouxuLeón Orell Valerian Liehr-12/+19
handle cygwin environment in `install::sanitize_sh` Resolves #132507
2024-12-10bootstrap: Forward cargo JSON output to stout, not stderrZalathar-1/+1
2024-12-10We don't need `NonNull::as_ptr` debuginfoScott McMurray-0/+5
Stop pessimizing the use of local variables in core by skipping debug info for MIR temporaries in tiny (single-BB) functions. For functions as simple as this -- `Pin::new`, etc -- nobody every actually wants debuginfo for them in the first place. They're more like intrinsics than real functions, and stepping over them is good.
2024-12-10Rollup merge of #133853 - onur-ozkan:use-vendor-directory-on-dist-build, ↵León Orell Valerian Liehr-1/+11
r=Kobzol use vendor sources by default on dist tarballs Tarball sources are distributed with vendor sources along with the `.cargo/config.toml` file configured for vendor sources. This means we can use vendor sources by default unless explicitly disabled with `build.vendor=false` by the user. So, let's do that.
2024-12-09bootstrap: `print{,ln}!` -> `eprint{,ln}!`clubby789-150/+154
2024-12-09dist: Re-work how we describe the licence of Rust in our distributionsJonathan Pallant-10/+19
) add COPYRIGHT*.html files to the rustc binary distribution ) add contents of LICENSE folder to dist tarballs, because some of our in-tree licences will require that the license text is reproduced. ) The wording of COPYRIGHT is adjusted to not include license text (`reuse` ensures that it's in the LICENSE folder) ) A blanket copyright notice is added to LICENCE-MIT as required by the text. The general approach is that the license statements are now compiled using a tool in CI (generate-copyright), and you get either: * the source code (COPYRIGHT, LICENCE-APACHE, LICENCE-MIT, REUSE.toml and the LICENCES folder), or * the compiled version (COPYRIGHT.html, COPYRIGHT-library.html and the LICENCES folder).
2024-12-08handle cygwin environments in `install::sanitize_sh`onur-ozkan-12/+13
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-08implement `TargetSelection::is_cygwin` functiononur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-06Rollup merge of #133875 - onur-ozkan:early-return-rustfmt, r=jieyouxuMatthias Krüger-11/+26
handle `--json-output` properly Because `rustfmt` doesn't support JSON output, `x test --json-output` doesn't respect the `--json-output` flag during formatting step. This change makes that `x test` skips the formatting step if `--json-output` is specified. In addition, resolves #133855 with the 2nd commit.
2024-12-06handle `json_output` in `test::run_cargo_test`onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-06skip formatting when `--json-output` is usedonur-ozkan-11/+21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-06Promote powerpc64le-unknown-linux-musl to tier 2 with host toolsJens Reidel-0/+6
MCP: https://github.com/rust-lang/compiler-team/issues/803 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-05Rollup merge of #133821 - Kobzol:replace-black-with-ruff, r=onur-ozkanGuillaume Gomez-452/+772
Replace black with ruff in `tidy` `ruff` can both lint and format Python code (in fact, it should be a mostly drop-in replacement for `black` in terms of formatting), so it's not needed to use `black` anymore. This PR removes `black` and replaces it with `ruff`, to get rid of one Python dependency, and also to make Python formatting faster (although that's a small thing). If we decide to merge this, we'll need to "reformat the world" - `ruff` is not perfectly compatible with `black`, and it also looks like `black` was actually ignoring some files before. I tried it locally (`./x test tidy --extra-checks=py:fmt --bless`) and it also reformatted some code in subtrees (e.g. `clippy` or `rustc_codegen_gcc`) - I'm not sure how to handle that.
2024-12-05Rollup merge of #133898 - onur-ozkan:ignore-git-hook-on-dist-sources, r=jieyouxuJacob Pratt-4/+6
skip `setup::Hook` on non-git sources Running `setup::Hook` (with `x setup`) leads tarball sources to panic and this PR resolves that problem by skipping `Hook` step on non-git sources.