[experiment] bootstrap: leverage cargo trim-paths - #161049
Conversation
|
@bors try |
This comment has been minimized.
This comment has been minimized.
[experiment] bootstrap: leverage cargo trim-paths
This comment has been minimized.
This comment has been minimized.
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
|
@bors try jobs=dist-x86_64-msvc,dist-x86_64-linux,dist-aarch64-apple |
This comment has been minimized.
This comment has been minimized.
[experiment] bootstrap: leverage cargo trim-paths try-job: dist-x86_64-msvc try-job: dist-x86_64-linux try-job: dist-aarch64-apple
This comment has been minimized.
This comment has been minimized.
|
💔 Test for bd743b7 failed: CI. Failed jobs:
|
b0b31e6 to
9981c62
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors try jobs=dist-x86_64-msvc,dist-x86_64-linux,dist-aarch64-apple |
This comment has been minimized.
This comment has been minimized.
[experiment] bootstrap: leverage cargo trim-paths try-job: dist-x86_64-msvc try-job: dist-x86_64-linux try-job: dist-aarch64-apple
9981c62 to
21aed96
Compare
This comment has been minimized.
This comment has been minimized.
The nightly stage0 carries a cargo with `__CARGO_RUSTC_BOOTSTRAP_WS_REMAP` support (cargo submodule eb98b54bc), required for driving the build through `-Ztrim-paths`.
Starting with cc@1.3.0 cc inherits path remap rules from cargo trim-paths and forwards to the C/C++ compiler. With this and cargo `-Ztrim-paths`, we no longer need RUSTC_DEBUGINFO_MAP
Replace `RUSTC_DEBUGINFO_MAP` and `RUSTC_CARGO_REGISTRY_SRC_TO_REMAP` with cargo trim-paths and `__CARGO_RUSTC_BOOTSTRAP_WS_REMAP` override (See cargo#17309). The `RUSTC_DEBUGINFO_MAP` into `-ffile-prefix-map` in rustc_llvm will be covered cc@1.3.0+ natively (which inherits and forwards `CARGO_TRIM_PATHS_REMAP`)
The current dwarfdump checks cannot see `.rmeta` leaks: * The compiler keeps unremapped local paths in metadata unless the remap scope is `all` (see issue 159621) * std ships metadata as separate `.rmeta` via `-Zembed-metadata=no` so the leak does not even appear in the rlibs This commit enhances to also check rmeta files.
21aed96 to
80d0ecc
Compare
|
@bors try jobs=dist-x86_64-msvc,dist-x86_64-linux,dist-aarch64-apple |
This comment has been minimized.
This comment has been minimized.
[experiment] bootstrap: leverage cargo trim-paths try-job: dist-x86_64-msvc try-job: dist-x86_64-linux try-job: dist-aarch64-apple
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
cc @Urgau. I think this is pretty solid. I haven't verified artifacts manually yet I did have some agents comprehensive reports for all three platforms. Let me know if you want to take a look of them. |
|
rust-lang/cc-rs#1794 this is the thing that helps remap rustc_llvm. |
|
bootstraps also sets C/C++ arguments at Lines 1262 to 1271 in 2fb4ed8 |
View all comments
What
Leverage Cargo's
-Ztrim-pathsto remap compiler and library. See rust-lang/cargo#17309.I'll do some dist jobs and see if artifacts are remapped correctly.
try-jobs: dist-x86_64-msvc
try-jobs: dist-x86_64-linux
try-jobs: dist-aarch64-apple
🤖 LLM disclosure: I used LLM to do the first pass of bootstrap integration and temporary stage0 bump. The usage was signed off here on Zulip: #llm-reviews > Experiment with Cargo's trim-path in bootstrap