rust/src
Guillaume Gomez fec5c8fd7c
Rollup merge of #141789 - ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789
Exclude `CARGO_HOME` from `generate-copyright` in-tree determination

On Ferrocene, we noticed that in our releases the out-of-tree notices were not being included. When `x.py run generate-copyright` was ran on local development machines, it worked fine.

After some investigations ``@tshepang`` and I determined that the problem was that the cargo registry (located in `CARGO_HOME`) started with the source directory on CI jobs, and was being excluded by this line:

15825b7161/src/tools/generate-copyright/src/cargo_metadata.rs (L85-L88)

In Ferrocene's `run.sh` we set `CARGO_HOME` to be `build/cargo-home`: 96a45dd9a1/ferrocene/ci/run.sh (L34-L46) which caused this issue.

This PR passes the `CARGO_HOME` variable to the `generate-copyright` tool and expands the consideration of in-tree-ness to be aware of `CARGO_HOME`. It is an upstreaming of https://github.com/ferrocene/ferrocene/pull/1491.

## Testing

Run `CARGO_HOME=build/cargo-home ./x.py run generate-copyright` on `master`, then check `build/host/doc/COPYRIGHT` and look for out of tree dependencies (at the bottom).

Then, try running the same command in this branch.
2025-06-01 19:35:44 +02:00
..
bootstrap Rollup merge of #141789 - ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789 2025-06-01 19:35:44 +02:00
build_helper Add some new solver to PGO 2025-05-31 09:54:28 +00:00
ci Rollup merge of #141277 - RalfJung:miri-ci, r=oli-obk 2025-06-01 00:35:51 +02:00
doc Auto merge of #141717 - jhpratt:rollup-neu8nzl, r=jhpratt 2025-05-29 08:53:27 +00:00
etc Auto merge of #141062 - ChaiTRex:ide_fmt_2024, r=Mark-Simulacrum 2025-05-23 11:15:24 +00:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Rollup merge of #141740 - nnethercote:hir-ItemKind-field-order, r=fee1-dead 2025-05-31 18:51:48 +02:00
llvm-project@c1118fdbb3 Update to LLVM 20.1.5 2025-05-16 08:34:16 +08:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc JSON: Don't apply #[repr] privacy heuristics 2025-05-22 21:26:48 +02:00
tools Rollup merge of #141789 - ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789 2025-06-01 19:35:44 +02:00
README.md
stage0 Bump master stage0 compiler 2025-05-27 20:36:00 +08:00
version bump version number to 1.89.0 2025-05-09 11:13:08 +02:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.