about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-09 10:24:27 +0000
committerbors <bors@rust-lang.org>2022-11-09 10:24:27 +0000
commit0aaad9e757207657064d70bf9e6c1e6eb327bf15 (patch)
treee2616562465ccbb4666b4ac5ec8f92f53d4e8dcd /compiler/rustc_codegen_llvm/src
parentd22c43389da86abba64fbed8b4a7e2ba8a1a7c10 (diff)
parent8810174a16a72d6fa4bf1322adb54acda0f40b27 (diff)
downloadrust-0aaad9e757207657064d70bf9e6c1e6eb327bf15.tar.gz
rust-0aaad9e757207657064d70bf9e6c1e6eb327bf15.zip
Auto merge of #102565 - jyn514:refactor-build-manifest, r=Mark-Simulacrum
Refactor build-manifest to minimize the number of changes needed to add a new component

- Add all components to `PkgType`
- Automate functionality wherever possible, so functions often don't have to be manually edited
- Where that's not possible, use exhaustive matches on `PkgType` instead of adding individual strings.
- Add documentation for how to add a component. Improve the existing documentation for how to test changes.

I tested locally that this generates an identical manifest before and after my change, as follows:
```sh
git checkout d44e14225ab00e164aa9ea9e8d9e1bee40f96b3e
cargo +nightly run --manifest-path src/tools/build-manifest/Cargo.toml build/dist build/manifest-before 1970-01-01 http://example.com nightly
git checkout refactor-build-manifest
cargo +nightly run --manifest-path src/tools/build-manifest/Cargo.toml build/dist build/manifest-before 1970-01-01 http://example.com nightly
sort -u build/manifest-before/channel-rust-nightly.toml | diff - <(sort -u build/manifest-after/channel-rust-nightly.toml)
```
I then verified by hand that the differences before sorting are inconsequential (mostly targets being slightly reordered).

The only change in behavior is that `llvm-tools` is now properly renamed to `llvm-tools-preview`:
```
; sort -u build/manifest-before/channel-rust-nightly.toml | diff - <(sort -u build/manifest-after/channel-rust-nightly.toml)
784a785
> [renames.llvm-tools]
894a896
> to = "llvm-tools-preview"
```

This is based on https://github.com/rust-lang/rust/pull/102241 and should not be merged before.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions