Commit Graph

74 Commits

Author SHA1 Message Date
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
Caleb Cartwright
e2fe4f2c61 update RLS and rustfmt 2021-04-12 09:01:17 -05:00
Joshua Nelson
1b0b7e95be Update stdarch submodule (to before it switched to const generics)
This also includes a cherry-pick of
ec1461905b
and https://github.com/rust-lang/stdarch/pull/1108 to fix a build
failure.

It also adds a re-export of various macros to the crate root of libstd -
previously they would show up automatically because std_detect was defined
in the same crate.
2021-04-12 09:39:04 -04:00
Caleb Cartwright
0a47a38fd0 remove unused backtrace refs 2021-02-09 19:56:18 -06:00
Rune Tynan
3076e255fe
src/etc/json-types -> src/rustdoc-json-types 2021-01-27 18:58:43 -05:00
Rune Tynan
3c2806957e
Move into src/etc 2021-01-27 18:57:14 -05:00
Rune Tynan
c689b97fba
Split JSON into separately versioned crate 2021-01-27 18:56:57 -05:00
Rune Tynan
7715656edd
Add jsondocck tool, and use it for rustdoc JSON 2021-01-19 14:24:25 -05:00
Eric Huss
74498c17e0 Update cargo 2020-12-18 07:30:23 -08:00
Mara Bos
7d9ad6d949
Rollup merge of #78658 - casey:x, r=Mark-Simulacrum
Add a tool to run `x.py` from any subdirectory

This adds a binary called `x` in `src/tools/x`. All it does is check the current directory and its ancestors for a file called `x.py`, and if it finds one, runs it.

By installing x, you can easily run `x.py` from any subdirectory, and only need to type `x`.

It can be installed with `cargo install --path src/tools/x`

This is a copy of a [binary I've been using myself when working on rust](https://github.com/casey/bootstrap), currently published to crates.io as `bootstrap`.

It could be changed to avoid indirecting through `x.py`, and instead call the bootstrap module directly. However, this seemed like the simplest thing possible, and won't break if the details of how the bootstrap module is invoked change.
2020-11-08 13:36:09 +01:00
Casey Rodarmor
5fc22f1431
Add a tool to run x.py from any subdirectory
This adds a binary called `x` in `src/tools/x`. All it does is check the
current directory and its ancestors for a file called `x.py`, and if it
finds one, runs it.

By installing x, you can easily `x.py` from any subdirectory.

It can be installed globally with `cargo install --path src/tools/x`
2020-11-03 19:40:02 -08:00
bjorn3
cf798c1ec6 Add support for using cg_clif to bootstrap rustc 2020-10-26 09:52:59 +01:00
Eric Huss
45c1e0ae07 Auto-generate lint documentation. 2020-09-13 08:48:03 -07:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00