Skip to content

Commit

Permalink
Rollup merge of rust-lang#112382 - jyn514:test-download-rustc-macos, …
Browse files Browse the repository at this point in the history
…r=albertlarsan68

download-rustc: Fix `x test core` on MacOS

before, this hardcoded `.so` as the extension for dynamically linked objects, which is incorrect everywhere except linux.
  • Loading branch information
Dylan-DPC authored Jun 7, 2023
2 parents 1dc4b40 + a2ab47f commit 90c361c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,12 @@ impl Step for Sysroot {
// newly compiled std, not the downloaded std.
add_filtered_files("lib", builder.config.ci_rust_std_contents());

let filtered_extensions = [OsStr::new("rmeta"), OsStr::new("rlib"), OsStr::new("so")];
let filtered_extensions = [
OsStr::new("rmeta"),
OsStr::new("rlib"),
// FIXME: this is wrong when compiler.host != build, but we don't support that today
OsStr::new(std::env::consts::DLL_EXTENSION),
];
let ci_rustc_dir = builder.ci_rustc_dir(builder.config.build);
builder.cp_filtered(&ci_rustc_dir, &sysroot, &|path| {
if path.extension().map_or(true, |ext| !filtered_extensions.contains(&ext)) {
Expand Down

0 comments on commit 90c361c

Please sign in to comment.