about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-12-31handle submodules automatically on `doc` stepsonur-ozkan-30/+23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31Use struct-like syntax in `tool_check_step!`Zalathar-15/+18
This tricks rustfmt into formatting the macro arguments as expressions, instead of giving up and ignoring them.
2024-12-31Make `tool_check_step!` always assume `SourceType::InTree`Zalathar-21/+23
All of the tools that use this macro are currently in-tree, so support for specifying a `SourceType` was not meaningfully used. It can potentially be re-added in the future if needed.
2024-12-31Infer tool-check-step display name from the last path componentZalathar-24/+13
2024-12-31Move most of the `Step::run` impl out of `tool_check_step!`Zalathar-45/+41
Ordinary code is much easier to work with than macro-generated code.
2024-12-31Rollup merge of #134919 - Zalathar:x-test-compiler, r=jieyouxuStuart Cook-2/+24
bootstrap: Make `./x test compiler` actually run the compiler unit tests Fixes #134916.
2024-12-31Make `./x test compiler` actually run the compiler unit testsZalathar-2/+24
2024-12-30Rollup merge of #134911 - HigherOrderLogic:master, r=onur-ozkanMatthias Krüger-3/+3
chore: fix typos This PR fixes typos errors in docstring only, so functionality wise, it should stay the same.
2024-12-30chore: fix typosHoru-3/+3
2024-12-30Auto merge of #134865 - clubby789:proc-macro-tls, r=onur-ozkanbors-1/+75
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros Fixes #134863 1. Checks if a crate name is in a static list before applying the flag 2. Adds a tidy check that gathers transitive deps of proc macros and ensures the list is up to date cc `@bjorn3` - the issue specifies `rustc_fluent_macro` but I assume this applies to all proc macro crates.
2024-12-29bootstrap: Don't apply `-Ztls-model=initial-exec` to deps of proc-macrosclubby789-1/+4
2024-12-29Add tidy check for list of proc-macro crate transitive dependenciesclubby789-0/+71
2024-12-29Auto merge of #134887 - Zalathar:rollup-ghpz7oy, r=Zalatharbors-106/+127
Rollup of 5 pull requests Successful merges: - #134799 (nits: Cleanups in `librustdoc::clean`) - #134851 (docs: inline `alloc::ffi::c_str` types to `alloc::ffi`) - #134869 (Bump compiler cc) - #134876 (bootstrap: Consolidate the macros for declaring compiletest test suites) - #134883 (bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-29Rollup merge of #134883 - Zalathar:shared-helpers, r=clubby789Stuart Cook-3/+14
bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests` Running `./x check bootstrap` currently doesn't work, because it builds the bootstrap shim binaries with `cfg(test)`, and those binaries can't find a `tests` submodule when they include `shared_helpers.rs` via `#[path]`. This PR fixes that by taking the tests module and moving it to `super::tests::shared_helpers_tests` instead. (The extra `tests` submodule prevents tidy from complaining about unit tests that aren't in a dedicated tests module.) --- It would be nice to also run `./x check bootstrap compiletest` in CI, so that this and #134848 don't regress, but I didn't want to bundle that change with this fix.
2024-12-29Auto merge of #134650 - onur-ozkan:clean-up-fixmes, r=Kobzolbors-14/+9
Clean up some FIXME notes on bootstrap Fixing and removing some FIXME notes.
2024-12-29Fix `./x check bootstrap` by moving `shared_helpers::tests`Zalathar-3/+14
2024-12-29Allow macro-declared test steps to have docstrings and attributesZalathar-21/+32
2024-12-29Consolidate the macros for declaring compiletest suitesZalathar-82/+81
2024-12-28Auto merge of #134848 - Zalathar:check-compiletest, r=jieyouxubors-0/+4
bootstrap: Allow `./x check compiletest` Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does! Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
2024-12-28Auto merge of #134845 - jieyouxu:temp-drop-warning, r=onur-ozkanbors-13/+4
bootstrap: drop warning for top-level test suite path check due to false positives The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic. This retains the fix for the Windows path handling (unlike #134843). r? `@onur-ozkan`
2024-12-28Auto merge of #134790 - onur-ozkan:cfg-test, r=clubby789bors-22/+19
replace bootstrap-self-test feature flag with cfg(test) This makes it in more rusty way.
2024-12-28bootstrap: Allow `./x check compiletest`Zalathar-0/+4
2024-12-28bootstrap: drop warning for top-level test suite path check许杰友 Jieyou Xu (Joe)-13/+4
This doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. A proper fix will need to possibly query test `Step`s for their exclude logic.
2024-12-28remove deprecated option `parallel-compiler`onur-ozkan-10/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28read to `String` directly without extra conversiononur-ozkan-2/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28remove an invalid FIXME noteonur-ozkan-2/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-27Auto merge of #134830 - matthiaskrgr:rollup-7hdjojz, r=matthiaskrgrbors-0/+21
Rollup of 6 pull requests Successful merges: - #133663 (Add a compiler intrinsic to back `bigint_helper_methods`) - #134798 (Make `ty::Error` implement all auto traits) - #134808 (compiletest: Remove empty 'expected' files when blessing) - #134809 (Add `--no-capture`/`--nocapture` as bootstrap arguments) - #134826 (Add spastorino to users_on_vacation) - #134828 (Add clubby789 back to bootstrap review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-27Add change tracker entryclubby789-0/+5
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