Commit Graph

87 Commits

Author SHA1 Message Date
Trevor Gross 42b9cb1cb5 Switch to using the v2 resolver in most workspaces
Pinning the resolver to v1 was done in 5abff3753a ("Explicit set
workspace.resolver ...") in order to suppress warnings. Since there is
no specific reason not to use the new resolver and since it fixes
issues, change to `resolver = "2"` everywhere except library and
submodules.
2024-08-18 13:59:09 -05:00
bjorn3 1f3be75f56 Move the standard library to a separate workspace
This ensures that the Cargo.lock packaged for it in the rust-src
component is up-to-date, allowing rust-analyzer to run cargo metadata on
the standard library even when the rust-src component is stored in a
read-only location as is necessary for loading crates.io dependencies of
the standard library.

This also simplifies tidy's license check for runtime dependencies as it
can now look at all entries in library/Cargo.lock without having to
filter for just the dependencies of runtime crates. In addition this
allows removing an exception in check_runtime_license_exceptions that
was necessary due to the compiler enabling a feature on the object crate
which pulls in a dependency not allowed for the standard library.

While cargo workspaces normally enable dependencies of multiple targets
to be reused, for the standard library we do not want this reusing to
prevent conflicts between dependencies of the sysroot and of tools that
are built using this sysroot. For this reason we already use an unstable
cargo feature to ensure that any dependencies which would otherwise be
shared get a different -Cmetadata argument as well as using separate
build dirs.

This doesn't change the situation around vendoring. We already have
several cargo workspaces that need to be vendored. Adding another one
doesn't change much.

There are also no cargo profiles that are shared between the root
workspace and the library workspace anyway, so it doesn't add any extra
work when changing cargo profiles.
2024-08-02 10:48:12 +00:00
Eric Huss 5dfa062b87 Move rustbook to its own workspace. 2024-07-22 07:20:57 -07:00
Trevor Gross 51827ce4e4 Move `test-float-parse` to the global workspace
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
2024-07-20 11:39:34 -05:00
Alex Crichton 2a3e22bf04 Promote the `wasm32-wasip2` target to Tier 2
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:

1. The `dist-various-2` container, which already produces the other WASI
   targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
   LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-09 12:11:08 -07:00
Jakub Beránek 151986f493 Implement `x perf` as a separate tool 2024-06-27 10:22:03 +02:00
Zalathar fd4fe7d129 Remove `src/tools/rust-demangler` 2024-06-19 20:41:34 +10:00
Jakub Beránek 0b1ecf1d8d
Remove the `expand-yaml-anchors` tool 2024-04-29 21:33:17 +02:00
Alex Macleod 5b5ee0e7bd Remove unused `[patch]` for clippy_lints 2024-04-26 15:35:43 +01:00
Mark Rousskov f946bf4f2e Remove debuginfo from rustc-demangle too
This is done for the same reason as the other dependencies in this list.
2024-04-07 19:19:11 -04:00
Ben Kimock 2f6fb234de Add a test 2024-03-20 23:36:05 -04:00
Kjetil Kjeka 222ce4fdb8 LLVM Bitcode Linker: Added crate 2024-03-11 13:35:35 +01:00
许杰友 Jieyou Xu (Joe) 48e9f92ce2
Add supporting infrastructure for `run-make` V2 tests 2024-02-29 16:30:38 +00:00
Kleinmarb e49442bf98 fix typo 2024-01-09 22:44:32 +01:00
Mark Rousskov 94a59d6f62 Strip lld-wrapper binaries
This cuts down on the amount of data we need to ship and users need to
keep on disk for each Rust toolchain. As noted in the added comment,
there's not much going on in these executables, so the added benefit of
symbols and debuginfo isn't large, while the cost is not insignificant.

This takes each of the binaries (we store 4 identical copies under
different names) from 3.7MB to 384KB.
2024-01-06 09:39:19 -05:00
Zalathar 1367104cb2 Add tool `src/tools/coverage-dump` for use by some new coverage tests 2023-09-05 11:11:48 +10:00
Philipp Krones c2490bdc44
Update Cargo.lock/toml
Remove clippy_test_deps from Cargo.toml
2023-07-17 10:22:41 +02:00
Jakub Beránek 91d2fb2e2b
Port PGO/LTO/BOLT optimized build pipeline to Rust 2023-07-09 08:39:50 +02:00
Philipp Krones de69d556eb
Fix compile-test tests to work with the new ui_test crate 2023-07-02 15:07:39 +02:00
Weihang Lo 5abff3753a
Explicit set `workspace.resolver = "1"`
rust-lang/cargo#10910 starts emitting warning if resolver is not set
for 2021 edition package. We want to surpress the warning for now.
2023-05-31 00:08:11 +01:00
ozkanonur c36b2092bb create new tool rustdoc-gui-test 2023-05-20 14:40:11 +03:00
Chris Denton f9b3d6a525
Generate windows-sys bindings 2023-05-05 20:48:16 +01:00
John Kåre Alsaker fd4c81f4c1 Add a `sysroot` crate to represent the standard library crates 2023-04-25 13:40:36 +02:00
Weihang Lo befa5c98c9
chore: remove `rustc-workspace-hack`
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:20 +01:00
Weihang Lo f795a150fe
chore: allow `cargo` to have its own workspace
This also

* bumps cargo to the latest in rust-lang/cargo.
* adds 0BSD to allowed list of licenses

Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:12 +01:00
Ezra Shaw 1e95cddc74
feat: implement basic suggest-tests tool 2023-04-09 19:59:14 +12:00
Albert Larsan 40ba0e84d5
Change `src/test` to `tests` in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
Nilstrieb 25c153149e Add `build_helper` crate to share code between tidy and bootstrap 2023-01-03 17:45:34 +01:00
Joshua Nelson 90a10cae4b Revert "Auto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514"
This reverts commit 4839886f0a, reversing
changes made to ce85c98575.
2022-12-31 01:55:24 +00:00
Nilstrieb 878af66b53 Add `build_helper` crate to share code between tidy and bootstrap 2022-12-30 20:41:47 +01:00
Joshua Nelson f94c926aec Support documenting Cargo
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo, but as a nice side effect this makes `x doc cargo` work locally.
2022-12-22 14:33:22 -06:00
Pietro Albini 4af7de13d2
initial prototype of the tool to generate copyright notices 2022-11-15 15:02:03 +01:00
Pietro Albini 13efb20846
add tool to collect license metadata from REUSE 2022-11-15 14:50:20 +01:00
Jakob Degen 17395b45b1 Detect unused files in `src/test/mir-opt` and error on them in tidy. 2022-10-31 21:45:41 -07:00
Nixon Enraght-Moony 2506aa0394 jsondoclint: New Tool 2022-09-14 12:30:23 +01:00
Eric Huss 4a7e2fbb7b Sunset RLS 2022-08-27 21:36:08 -07:00
est31 d32ff14b86 Add replace-version-placeholder tool
This tool is to be ran at specific points in the release process to replace
the version place holder made by stabilizations with the version number.
2022-08-27 17:39:11 +02:00
Yotam Ofek ee0ce346e8
Fix small typo in Cargo.toml comment 2022-07-28 14:29:58 +03:00
Joshua Nelson 9cde0f7877 Fully remove submodule handling from bootstrap.py
These submodules were previously updated in python because Cargo gives a hard error if toml files
are missing from the workspace:

```
error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls`

Caused by:
  failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml
```

However, bootstrap doesn't actually need to be part of the workspace.
Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python.

Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now.
Given that we're planning to make the main entrypoint a shell script (or rust binary),
I think this is a good tradeoff for reduced complexity in bootstrap.py.
2022-06-21 22:55:43 -05:00
Joshua Nelson 687e53ebfe Allow `cargo run` instead of `cargo run -p bootstrap`
This was part of Mark's original PR in ecb424f129,
but I missed it when writing #92260.
2022-03-09 22:37:44 -06:00
Hans Kratz aacb497c36 Temporarily turn overflow checks off for rustc-rayon-core 2021-10-24 15:36:45 +02:00
Joshua Nelson 7f974d0aae Greatly reduce amount of debuginfo compiled for bootstrap itself
Rather than compiling rustbuild and all its dependencies with
`debuginfo=2`, this compiles dependencies without debuginfo and
rustbuild with `debuginfo=1`. On my laptop, this brings compile times
down from ~1:20 to ~1:05.
2021-10-10 21:18:57 -05:00
Hans Kratz 6162fc0c80 Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld`
directory and its sole purpose is to invoke `rust-lld` in the parent directory with
the correct flavor.
2021-10-07 16:59:13 +02:00
Guillaume Gomez 864290472f
Rollup merge of #87260 - antoyo:libgccjit-codegen, r=Mark-Simulacrum
Libgccjit codegen

This PR introduces a subtree for a gcc-based codegen backend to the repository, per decision in https://github.com/rust-lang/compiler-team/issues/442. We do not yet expect to ship this backend on nightly or run tests in CI, but we do verify that the backend checks (i.e., `cargo check`) successfully.

Work is expected to progress primarily in https://github.com/rust-lang/rustc_codegen_gcc, with semi-regular upstreaming, like with other subtrees.
2021-09-28 20:00:12 +02:00
Pietro Albini 80b81adc63
switch stage0.txt to stage0.json and add a tool to generate it 2021-08-26 15:29:27 +02:00
Antoni Boucher 7132ce63cf Exclude rustc_codegen_gcc from namespace 2021-08-12 21:56:24 -04:00
Guillaume Gomez 3bafcf87aa Remove cargo workspace to build rustdoc-gui test crates because of cargo config not being applied 2021-07-21 20:07:50 +02:00
Guillaume Gomez 83a2bc31b9 Add new tool to check HTML:
* Make html-checker run by default on rust compiler docs as well
 * Ensure html-checker is run on CI
 * Lazify tidy binary presence check
2021-06-28 18:05:15 +02:00
Joshua Nelson 8c25e27f16 Implement `x.py test src/tools/clippy --bless`
- Add clippy_dev to the rust workspace

  Before, it would give an error that it wasn't either included or
  excluded from the workspace:

  ```
  error: current package believes it's in a workspace when it's not:
  current:   /home/joshua/rustc/src/tools/clippy/clippy_dev/Cargo.toml
  workspace: /home/joshua/rustc/Cargo.toml

  this may be fixable by adding `src/tools/clippy/clippy_dev` to the `workspace.members` array of the manifest located at: /home/joshua/rustc/Cargo.toml
  Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
  ```

- Change clippy's copy of compiletest not to special-case
  rust-lang/rust. Using OUT_DIR confused `clippy_dev` and it couldn't find
  the test outputs. This is one of the reasons why `cargo dev bless` used
  to silently do nothing (the others were that `CARGO_TARGET_DIR` and
  `PROFILE` weren't set appropriately).

- Run clippy_dev on test failure

I tested this by removing a couple lines from a stderr file, and they
were correctly replaced.

- Fix clippy_dev warnings
2021-04-27 16:57:29 +00:00
bors d0695c9081 Auto merge of #83776 - jyn514:update-stdarch-docs, r=Amanieu
Update stdarch submodule (to before it switched to const generics)

https://github.com/rust-lang/rust/pull/83278#issuecomment-812389823: This unblocks #82539.

Major changes:
- More AVX-512 intrinsics.
- More ARM & AArch64 NEON intrinsics.
- Updated unstable WASM intrinsics to latest draft standards.
- std_detect is now a separate crate instead of a submodule of std.

I double-checked and the first use of const generics looks like 8d5017861e, which isn't included in this PR.

r? `@Amanieu`
2021-04-12 18:29:25 +00:00