| Age | Commit message (Collapse) | Author | Lines |
|
|
|
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
|
|
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
|
|
This was done in #145740 and #145947. It is causing problems for people
using r-a on anything that uses the rustc-dev rustup package, e.g. Miri,
clippy.
This repository has lots of submodules and subtrees and various
different projects are carved out of pieces of it. It seems like
`[workspace.dependencies]` will just be more trouble than it's worth.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Another refactor pulled out from 138759
The previous implementation I'd written here based on `index_by_increasing_offset` is complicated to follow and difficult to extend to non-structs.
This changes the implementation, without actually changing any codegen (thus no test changes either), to be more like the existing `extract_field` (<https://github.com/rust-lang/rust/blob/2b0274c71dba0e24370ebf65593da450e2e91868/compiler/rustc_codegen_ssa/src/mir/operand.rs#L345-L425>) in that it allows setting a particular field directly.
Notably I've found this one much easier to get right, in particular because having the `OperandRef<Result<V, Scalar>>` gives a really useful thing to include in ICE messages if something did happen to go wrong.
|
|
|
|
make `rustc_attr_parsing` less dominant in the rustc crate graph
It has/had a glob re-export of `rustc_attr_data_structures`, which is a crate much lower in the graph, and a lot of crates were using it *just* (or *mostly*) for that re-export, while they can rely on `rustc_attr_data_structures` directly.
Previous graph:

Graph with this PR:

The first commit keeps the re-export, and just changes the dependency if possible. The second commit is the "breaking change" which removes the re-export, and "explicitly" adds the `rustc_attr_data_structures` dependency where needed. It also switches over some src/tools/*.
The second commit is actually a lot more involved than I expected. Please let me know if it's a better idea to back it out and just keep the first commit.
|
|
|
|
|
|
|
|
It's very useful. There are some false positives involving integration
tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a
false positive involving `rustc_driver_impl`'s
`rustc_randomized_layouts` feature. And I removed a `rustc_span` mention
in a doc comment in `rustc_log` because it wasn't integral to the
comment but caused a dev-dependency.
|
|
|
|
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).
This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304>.
This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing
changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
|
|
By naming them in `[workspace.lints.rust]` in the top-level
`Cargo.toml`, and then making all `compiler/` crates inherit them with
`[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`,
because they're a bit different.)
The advantages of this over the current approach:
- It uses a standard Cargo feature, rather than special handling in
bootstrap. So, easier to understand, and less likely to get
accidentally broken in the future.
- It works for proc macro crates.
It's a shame it doesn't work for rustc-specific lints, as the comments
explain.
|
|
See <https://github.com/rust-lang/rust/issues/137733>.
|
|
|
|
with rust-analyzer
|
|
|
|
- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long.
- For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell.
- Move `.rlib` to outside the glob.
- Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments.
This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests.
- Only use linker-flavor=gnu-cc if we're actually going to compare the output. It doesn't exist on MacOS.
|
|
|
|
|
|
|
|
- `cc` 1.2.4 contains a fix to address [rustc uses wrong build tools
when compiling from MSVC
#133794](https://github.com/rust-lang/rust/issues/133794). See
<https://github.com/rust-lang/cc-rs/releases/tag/cc-v1.2.4>.
- `cc` 1.2.5 contains a fix to also check linking when testing if
certain compiler flags are supported, which fixed an issue that was
causing previous compiler `cc` bumps to fail. See
<https://github.com/rust-lang/cc-rs/releases/tag/cc-v1.2.5>.
Co-authored-by: David Lönnhager <david.l@mullvad.net>
|
|
Pin `cc` and run `cargo update`
`cc` tends to cause issues with automatic bumps so locking it to be bumped individually when necessary
<details>
<summary>compiler and tools dependencies</summary>
```
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating annotate-snippets v0.11.4 -> v0.11.5
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating colored v2.1.0 -> v2.2.0
Updating console v0.15.8 -> v0.15.10
Updating crossbeam-channel v0.5.13 -> v0.5.14
Updating crossbeam-deque v0.8.5 -> v0.8.6
Updating crossbeam-utils v0.8.20 -> v0.8.21
Updating encode_unicode v0.3.6 -> v1.0.0
Updating fastrand v2.2.0 -> v2.3.0
Updating home v0.5.9 -> v0.5.11
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustc-stable-hash v0.1.0 -> v0.1.1
Updating rustix v0.38.41 -> v0.38.42
Updating self_cell v1.0.4 -> v1.1.0
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating time v0.3.36 -> v0.3.37
Updating time-macros v0.2.18 -> v0.2.19
Updating tokio v1.41.1 -> v1.42.0
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Updating wasm-encoder v0.221.0 -> v0.221.2
Updating wasmparser v0.221.0 -> v0.221.2
Updating wast v221.0.0 -> v221.0.2
Updating wat v1.221.0 -> v1.221.2
```
</details>
<details>
<summary>library dependencies</summary>
```
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating libc v0.2.167 -> v0.2.168
```
</details>
<details>
<summary>rustbook dependencies</summary>
```
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating fastrand v2.2.0 -> v2.3.0
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustix v0.38.41 -> v0.38.42
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Removing windows-sys v0.52.0
```
</details>
|
|
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating annotate-snippets v0.11.4 -> v0.11.5
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating colored v2.1.0 -> v2.2.0
Updating console v0.15.8 -> v0.15.10
Updating crossbeam-channel v0.5.13 -> v0.5.14
Updating crossbeam-deque v0.8.5 -> v0.8.6
Updating crossbeam-utils v0.8.20 -> v0.8.21
Updating encode_unicode v0.3.6 -> v1.0.0
Updating fastrand v2.2.0 -> v2.3.0
Updating home v0.5.9 -> v0.5.11
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustc-stable-hash v0.1.0 -> v0.1.1
Updating rustix v0.38.41 -> v0.38.42
Updating self_cell v1.0.4 -> v1.1.0
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating time v0.3.36 -> v0.3.37
Updating time-macros v0.2.18 -> v0.2.19
Updating tokio v1.41.1 -> v1.42.0
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Updating wasm-encoder v0.221.0 -> v0.221.2
Updating wasmparser v0.221.0 -> v0.221.2
Updating wast v221.0.0 -> v221.0.2
Updating wat v1.221.0 -> v1.221.2
library dependencies:
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating libc v0.2.167 -> v0.2.168
rustbook dependencies:
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating fastrand v2.2.0 -> v2.3.0
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustix v0.38.41 -> v0.38.42
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Removing windows-sys v0.52.0
|
|
|
|
|
|
It is effectively a global resource and the jobserver::Client in Session
was a clone of GLOBAL_CLIENT anyway.
|
|
Add licenses + Run `cargo update`
Replaces #131311
try-job: dist-x86_64-linux
License changes:
- `unicode_ident` 1.0.14 introduces `(MIT OR Apache-2.0) AND Unicode-3.0`, but `unicode_ident` 1.0.12 (`(MIT OR Apache-2.0) AND Unicode-DFS-2016`) is still in tree
- `instant` and its license exception are no longer used
```
compiler & tools dependencies:
Updating allocator-api2 v0.2.18 -> v0.2.20
Updating anyhow v1.0.92 -> v1.0.93
Removing bitflags v1.3.2
Updating blake3 v1.5.4 -> v1.5.5
Updating bstr v1.10.0 -> v1.11.0
Updating bytes v1.8.0 -> v1.9.0
Updating cargo-platform v0.1.8 -> v0.1.9
Updating cc v1.2.0 -> v1.2.2
Updating clap v4.5.20 -> v4.5.21
Updating clap_builder v4.5.20 -> v4.5.21
Updating clap_complete v4.5.36 -> v4.5.38
Updating clap_lex v0.7.2 -> v0.7.3
Updating color-print v0.3.6 -> v0.3.7
Updating color-print-proc-macro v0.3.6 -> v0.3.7
Updating cpufeatures v0.2.14 -> v0.2.16
Updating curl-sys v0.4.77+curl-8.10.1 -> v0.4.78+curl-8.11.0
Updating errno v0.3.9 -> v0.3.10
Updating fastrand v2.1.1 -> v2.2.0
Updating flate2 v1.0.34 -> v1.0.35
Updating handlebars v5.1.2 -> v6.2.0
Adding icu_collections v1.5.0
Adding icu_normalizer v1.5.0
Adding icu_normalizer_data v1.5.0
Adding icu_properties v1.5.1
Adding icu_properties_data v1.5.0
Updating idna v0.5.0 -> v1.0.3
Adding idna_adapter v1.2.0
Updating indexmap v2.6.0 -> v2.7.0
Updating indicatif v0.17.8 -> v0.17.9
Removing instant v0.1.13
Updating itoa v1.0.11 -> v1.0.14
Updating js-sys v0.3.72 -> v0.3.74
Updating libc v0.2.164 -> v0.2.167
Updating libloading v0.8.5 -> v0.8.6
Updating litemap v0.7.3 -> v0.7.4
Updating mdbook v0.4.40 -> v0.4.43
Adding num-modular v0.6.1
Adding num-order v1.2.0
Updating pathdiff v0.2.2 -> v0.2.3
Updating portable-atomic v1.9.0 -> v1.10.0
Updating proc-macro2 v1.0.89 -> v1.0.92
Updating regex-automata v0.4.8 -> v0.4.9
Updating rustc-hash v2.0.0 -> v2.1.0
Updating rustc_apfloat v0.2.1+llvm-462a31f5a5ab -> v0.2.2+llvm-462a31f5a5ab
Updating rustix v0.38.38 -> v0.38.41
Updating schannel v0.1.26 -> v0.1.27
Updating serde v1.0.214 -> v1.0.215
Updating serde_derive v1.0.214 -> v1.0.215
Updating serde_json v1.0.132 -> v1.0.133
Updating socket2 v0.5.7 -> v0.5.8
Updating spdx v0.10.6 -> v0.10.7
Updating syn v2.0.87 -> v2.0.90
Updating tempfile v3.13.0 -> v3.14.0
Updating terminal_size v0.4.0 -> v0.4.1
Updating thiserror v1.0.66 -> v1.0.69 (available: v2.0.3)
Updating thiserror-impl v1.0.66 -> v1.0.69
Updating tokio v1.41.0 -> v1.41.1
Updating tracing-attributes v0.1.27 -> v0.1.28
Updating tracing-error v0.2.0 -> v0.2.1
Removing unicode-bidi v0.3.17
Updating unicode-ident v1.0.13 -> v1.0.14
Updating url v2.5.2 -> v2.5.4
Adding utf16_iter v1.0.5
Adding utf8_iter v1.0.4
Updating wasm-bindgen v0.2.95 -> v0.2.97
Updating wasm-bindgen-backend v0.2.95 -> v0.2.97
Updating wasm-bindgen-macro v0.2.95 -> v0.2.97
Updating wasm-bindgen-macro-support v0.2.95 -> v0.2.97
Updating wasm-bindgen-shared v0.2.95 -> v0.2.97
Updating wasm-encoder v0.220.0 -> v0.221.0
Adding wasmparser v0.221.0
Updating wast v219.0.1 -> v221.0.0
Updating wat v1.219.1 -> v1.221.0
Adding web-time v1.1.0
Adding write16 v1.0.0
Updating yoke v0.7.4 -> v0.7.5
Updating yoke-derive v0.7.4 -> v0.7.5
Updating zerofrom v0.1.4 -> v0.1.5
Updating zerofrom-derive v0.1.4 -> v0.1.5
library dependencies:
Updating allocator-api2 v0.2.18 -> v0.2.20
Updating cc v1.2.0 -> v1.2.2
Updating libc v0.2.162 -> v0.2.164
Updating unwinding v0.2.3 -> v0.2.4
rustbook dependencies:
Updating anstream v0.6.17 -> v0.6.18
Updating anyhow v1.0.92 -> v1.0.93
Updating bstr v1.10.0 -> v1.11.0
Updating cc v1.2.0 -> v1.2.2
Updating clap v4.5.20 -> v4.5.21
Updating clap_builder v4.5.20 -> v4.5.21
Updating clap_complete v4.5.36 -> v4.5.38
Updating clap_lex v0.7.2 -> v0.7.3
Updating cpufeatures v0.2.14 -> v0.2.16
Adding displaydoc v0.2.5
Updating errno v0.3.9 -> v0.3.10
Updating fastrand v2.1.1 -> v2.2.0
Updating flate2 v1.0.34 -> v1.0.35
Updating hashbrown v0.15.0 -> v0.15.2
Adding icu_collections v1.5.0
Adding icu_locid v1.5.0
Adding icu_locid_transform v1.5.0
Adding icu_locid_transform_data v1.5.0
Adding icu_normalizer v1.5.0
Adding icu_normalizer_data v1.5.0
Adding icu_properties v1.5.1
Adding icu_properties_data v1.5.0
Adding icu_provider v1.5.0
Adding icu_provider_macros v1.5.0
Updating idna v0.5.0 -> v1.0.3
Adding idna_adapter v1.2.0
Updating indexmap v2.6.0 -> v2.7.0
Updating itoa v1.0.11 -> v1.0.14
Updating js-sys v0.3.72 -> v0.3.74
Updating libc v0.2.161 -> v0.2.167
Adding litemap v0.7.4
Updating mdbook v0.4.42 -> v0.4.43
Updating pathdiff v0.2.2 -> v0.2.3
Updating proc-macro2 v1.0.89 -> v1.0.92
Updating regex-automata v0.4.8 -> v0.4.9
Updating rustix v0.38.38 -> v0.38.41
Updating serde v1.0.214 -> v1.0.215
Updating serde_derive v1.0.214 -> v1.0.215
Updating serde_json v1.0.132 -> v1.0.133
Adding stable_deref_trait v1.2.0
Updating syn v2.0.87 -> v2.0.90
Adding synstructure v0.13.1
Updating tempfile v3.13.0 -> v3.14.0
Updating terminal_size v0.4.0 -> v0.4.1
Updating thiserror v1.0.66 -> v1.0.69
Updating thiserror-impl v1.0.66 -> v1.0.69
Adding tinystr v0.7.6
Removing tinyvec v1.8.0
Removing tinyvec_macros v0.1.1
Removing unicode-bidi v0.3.17
Updating unicode-ident v1.0.13 -> v1.0.14
Removing unicode-normalization v0.1.24
Updating url v2.5.2 -> v2.5.4
Adding utf16_iter v1.0.5
Adding utf8_iter v1.0.4
Updating wasm-bindgen v0.2.95 -> v0.2.97
Updating wasm-bindgen-backend v0.2.95 -> v0.2.97
Updating wasm-bindgen-macro v0.2.95 -> v0.2.97
Updating wasm-bindgen-macro-support v0.2.95 -> v0.2.97
Updating wasm-bindgen-shared v0.2.95 -> v0.2.97
Adding write16 v1.0.0
Adding writeable v0.5.5
Adding yoke v0.7.5
Adding yoke-derive v0.7.5
Adding zerofrom v0.1.5
Adding zerofrom-derive v0.1.5
Adding zerovec v0.10.4
Adding zerovec-derive v0.10.3
```
|
|
|
|
- Add test for issue 47446
- Implement the new lint lint_builtin_mixed_export_name_and_no_mangle
- Add suggestion how to fix it
|
|
|
|
|
|
Relax a debug assertion for dyn principal *equality* in codegen
Maybe this sucks and I should just bite the bullet and use `infcx.sub` here. Thoughts?
r? lcnr
Fixes #130855
|
|
`cc` was previously pinned because version 1.1.106 dropped support for
Visual Studio 12 (2013), and we wanted to decouple that from the rest of
the automated updates. As noted in [2], there is no longer anything
indicating we support VS2013, so it should be okay to unpin it.
`cc` 1.1.22 contains a fix that may help improve the high MSVC CI
failure rate [3], so we also have motivation to update to that point.
[1]: https://github.com/rust-lang/rust/issues/129307
[2]: https://github.com/rust-lang/rust/issues/129307#issuecomment-2383749868
[3]: https://github.com/rust-lang/rust/issues/127883
|
|
|
|
cargo_metadata, thorin-dwp, windows
|
|
This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've
additionally updated some other wasm-related dependencies in the
workspace to keep them up-to-date and try to avoid duplicate versions as
well.
|
|
Pin `cc` to 1.0.105
`cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet.
Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
|