about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/base.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-11 16:13:06 +0000
committerbors <bors@rust-lang.org>2025-08-11 16:13:06 +0000
commit6355cd39c81e9699b1925c58d2ed3165bcab1715 (patch)
tree5e2325fdbb8e1ea0aded3a853afe40d9af0d8324 /compiler/rustc_expand/src/base.rs
parentfce0e74720d199eb7839fdb51af35ac5226da178 (diff)
parent6893e691ea71b294f87a2c4a5c8f0a1f8168751d (diff)
downloadrust-6355cd39c81e9699b1925c58d2ed3165bcab1715.tar.gz
rust-6355cd39c81e9699b1925c58d2ed3165bcab1715.zip
Auto merge of #145207 - Kobzol:codegen-backend-clif-dist, r=jieyouxu
Ship correct Cranelift library in its dist component

The first commit adds a post-dist UI test to check that Cranelift can be used with the extracted dist x64 Linux archive.

The original codegen copy logic in the Cranelift dist step was a bit redundant, and I didn't notice in https://github.com/rust-lang/rust/pull/144787 that it's copying the codegen backend from the build compiler's sysroot, rather than the target compiler's sysroot. The second commit modifies the logic to directly access the built codegen file (there is no need to search for it in the compiler's sysroot, in fact when you run just `x dist rustc_codegen_cranelift`, it shouldn't "taint" the sysroot with the codegen backend! Which it did before https://github.com/rust-lang/rust/pull/144787) and copy it to the tarball under a normalized name. Thus we get around any similar potential issues in the future, and make previously implicit logic more explicit.

This also fixes running just `x dist rustc_codegen_cranelift` without enabling `cranelift` in `rust.codegen-backends`, which should have been enabled by https://github.com/rust-lang/rust/pull/144787, but it didn't work fully, because the dist step tried to copy the codegen backend from the compiler's sysroot, but it didn't contain the codegen backend if it was not enabled by `rust.codegen-backends`.

Fixes: https://github.com/rust-lang/rust/issues/145201

try-job: dist-x86_64-linux
Diffstat (limited to 'compiler/rustc_expand/src/base.rs')
0 files changed, 0 insertions, 0 deletions