revert deleting metadata id from filename of libstd.so

revert deleting metadata id from filename of libstd.so

Signed-off-by: fengting <fengting11@huawei.com>
This commit is contained in:
erjuan
2024-11-11 15:00:11 +08:00
parent 49e0aef456
commit 15d1b1e466
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -1512,10 +1512,7 @@ impl<'a> Builder<'a> {
Mode::Codegen => metadata.push_str("codegen"),
_ => {}
}
if mode != Mode::Std {
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
}
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
if cmd == "clippy" {
rustflags.arg("-Zforce-unstable-if-unmarked");
+1 -1
View File
@@ -1798,7 +1798,7 @@ pub fn run_cargo(
meta.len() == expected_len
&& filename
.strip_prefix(&prefix[..])
.map(|s| s.ends_with(&extension[..]))
.map(|s| s.starts_with('-') && s.ends_with(&extension[..]))
.unwrap_or(false)
});
let max = candidates.max_by_key(|&&(_, _, ref metadata)| {