| Age | Commit message (Collapse) | Author | Lines |
|
This reverts commit 095fa86a3ba30f4198c88ef300354391d3ab97e1.
|
|
bootstrap: rustdoc-js tests can now be filtered by js files
Before, a command like `./x test tests/rustdoc-js/path-ordering.js` would succeed, but run no tests, since the names of the tests are based on the `.rs` file. This is a bit confusing, as the `rustdoc-js-std` test suite only has `.js` files, and thus those are the files you filter on. Now, `./x test tests/rustdoc-js/path-ordering.js` will be treated as an alias for `./x test tests/rustdoc-js/path-ordering.rs`. This is fairly simple as each `rustdoc-js` test has 2 files, 1 js file and one rust file, each with an identical base filename, so all we need to do is swap the extension.
r? `@Kobzol`
|
|
Add --print target-spec-json-schema
This schema is helpful for people writing custom target spec JSON. It can provide autocomplete in the editor, and also serves as documentation when there are documentation comments on the structs, as `schemars` will put them in the schema.
I was motivated to do this because I saw someone write their own version of this schema by hand, so demand for this clearly exists. It's not a lot of effort to implement, so I thought it would make sense.
MCP: https://github.com/rust-lang/compiler-team/issues/905
I think it would also be useful to put this in the sysroot in `etc` so people can link it directly in their editors.
I would have loved to add a test that validates the JSON schema against the spec JSON of every builtin target, but I don't want to do it as the JSON schema validation crates have incredible amounts of dependencies because JSON schema supports a ton of random features. I don't want to add that, even as a dev dependency.
|
|
bootstrap: Build jemalloc for LoongArch with support for 16K pages
By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.
|
|
This schema is helpful for people writing custom target spec JSON. It
can provide autocomplete in the editor, and also serves as documentation
when there are documentation comments on the structs, as `schemars` will
put them in the schema.
|
|
Fix `libgccjit` symlink when we build GCC locally
Unblocks https://github.com/rust-lang/rust/pull/146414.
r? ```@GuillaumeGomez```
|
|
|
|
|
|
By default, jemalloc is configured with a 4K page size. If the
host’s page size is larger than this, it will crash at runtime.
This patch raises the page size to 16K.
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#139593 (add sitemap to rust docs)
- rust-lang/rust#145819 (Port limit attributes to the new attribute parsing infrastructure)
- rust-lang/rust#146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`)
- rust-lang/rust#146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit)
- rust-lang/rust#146195 (fix partial urlencoded link support)
- rust-lang/rust#146300 (Implement `Sum` and `Product` for `f16` and `f128`.)
- rust-lang/rust#146314 (mark `format_args_nl!` as `#[doc(hidden)]`)
- rust-lang/rust#146324 (const-eval: disable pointer fragment support)
- rust-lang/rust#146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.))
- rust-lang/rust#146339 (Update books)
- rust-lang/rust#146343 (Weakly export `platform_version` symbols)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
add sitemap to rust docs
attempt to mitigate https://github.com/rust-lang/rust/issues/104670
|
|
compiler: Add Windows resources to rustc-main and rustc_driver
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll
Invokes `rc.exe` directly, rather than using one of the crates from the ecosystem to avoid adding dependencies.
A new internal `rustc_windows_rc` crate has the common build script machinery for locating `rc.exe` and constructing the resource script
|
|
fix: offline rustdoc html missing favicon
As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG.
<img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
|
|
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites
## Summary
Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`.
| New test suites | Explanation |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. |
| `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. |
This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847).
Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`).
Fixes rust-lang/rust#134109.
## Remarks
- I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability.
- The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642).
---
try-job: aarch64-msvc-1
try-job: test-various
try-job: x86_64-gnu-debug
try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: dist-various-1
|
|
miri std tests: skip all of sys::
Matches https://github.com/rust-lang/miri-test-libstd/pull/104
|
|
Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI
This PR bumps the `toml` dependency of the `bump-stage0` tool to `0.8.23`, which AFAICT is the highest `toml` version that's present in the r-l/r workspace's `Cargo.lock` already (so we don't introduce _another_ `toml 0.x.*` series). I added some byte-buffer-to-string intermediary to workaround `toml 0.8.*` not having the `toml 0.9.*` `toml::from_slice` API.
To catch obvious build failures of the `src/tools/bump-stage0` tool early, before we find out it can't even build when we really need it to work.
Contexts:
- https://github.com/rust-lang/rust/pull/146250#issue-3388327410
- [#t-release > Bump stage0 rustfmt separately ("one-off") @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Bump.20stage0.20rustfmt.20separately.20.28.22one-off.22.29/near/537916615)
Fixes rust-lang/rust#146252.
|
|
|
|
|
|
Optimize Cargo with LTO
This optimization was "lost" when Cargo was switched away from a `ToolRustcPrivate` to a `ToolTarget` tool.
r? `@jieyouxu`
|
|
Document Cargo with in-tree rustdoc
Fixes https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/nightly.20rust.20doc.20seem.20corrupted.
r? `@jieyouxu`
try-job: dist-x86_64-linux-alt
|
|
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll
Sets the product description to "Rust Compiler" or "Rust Compiler (channel)" for non-stable channels
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So that contributors who don't need to run `run-make` tests that require
in-tree `cargo` can run the non-cargo `run-make` tests without having to
wait for `cargo` (which would require rebuilding as the build cache
would be invalidated by compiler modifications without some kind of
`--keep-stage-cargo`).
|
|
Add bootstrap.toml option to control debug breaking on ICEs on windows
When rustc ICEs during bootstrap on Windows, it will call `DebugBreak`. This is intended to trigger a Windows Error Reporting dialog that can launch a debugger. However on some setups (mine for one) this will just abort the process, hiding any ICEs on other threads as well. I also would not want to see this dialog even if it did work for me.
This PR adds a new option to bootstrap.toml `rust.break-on-ice` to configure this behavior. By default, it is enabled, matching the existing behavior.
|
|
|
|
Update bootstrap's dependencies to remove winapi and old windows-sys
Bumps `opener` to 0.8 and `junction` to 1.3 - this removes the dependency on `winapi` (unless the `build-metrics` feature is enabled) and replaces the usage of `windows-sys` 0.52 with 0.60.
Together this means that bootstrap can now be built for Arm64EC.
|
|
Promote aarch64-pc-windows-msvc to Tier 1
Per <https://github.com/rust-lang/rfcs/pull/3817>
Tracking issue: <https://github.com/rust-lang/rust/issues/145671>
|
|
Make bootstrap self test parallel
This PR refactors the bootstrap self test:
1. Replaced the hardcoded --test-threads=1 with std::thread::available_parallelism(), allowing tests to run with the maximum concurrency supported by the system.
2. Replaced custom hacks around OUT_DIR with TempDir and introduced TestCtx to simplify configuration setup.
r? `@Kobzol`
|
|
Rename `ToolRustc` to `ToolRustcPrivate`
I think that this name gets the point across much better.
r? ````@jieyouxu````
|
|
Test `rustc-dev` in `distcheck`
Adds a new `distcheck` test component.
Fixes: https://github.com/rust-lang/rust/issues/138646
r? ``@jieyouxu``
try-job: x86_64-gnu-distcheck
|
|
|
|
|
|
|
|
std: Start supporting WASIp2 natively
This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.
The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.
Implementation-wise the milestones here are:
* The `wasm32-wasip2` target now also depends on the `wasi` crate at
version 0.14.* in addition to the preexisting dependency of 0.11.*.
The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
`wasip1` where appropriate. For example `std::sys::pal::wasi` is now
called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
WASIp2. For example getting the current time, randomness, and
process arguments now use WASIp2 APIs directly instead of using WASIp1
APIs that require an adapter.
It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).
[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
|
|
|
|
Use std::thread::available_parallelism() instead of hardcoded
--test-threads=1 in bootstrap tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|