Revert "Fix linking statics on Arm64EC #140176"

Unfortunately, multiple people are reporting linker warnings related to
`__rust_no_alloc_shim_is_unstable` after this change. The solution isn't
quite clear yet, let's revert to green for now, and try a reland with a
determined solution for `__rust_no_alloc_shim_is_unstable`.

This reverts commit c8b7f32434, reversing
changes made to 667247db71.
This commit is contained in:
Jieyou Xu
2025-05-15 16:51:32 +08:00
parent 414482f6a0
commit 734a5b1aa7
11 changed files with 54 additions and 201 deletions

View File

@@ -5,19 +5,7 @@ use crate::spec::{BinaryFormat, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo
pub(crate) fn opts() -> TargetOptions {
// Suppress the verbose logo and authorship debugging output, which would needlessly
// clog any log files.
let pre_link_args = TargetOptions::link_args(
LinkerFlavor::Msvc(Lld::No),
&[
"/NOLOGO",
// "Symbol is marked as dllimport, but defined in an object file"
// Harmless warning that flags a potential performance improvement: marking a symbol as
// dllimport indirects usage via the `__imp_` symbol, which isn't required if the symbol
// is in the current binary. This is tripped by __rust_no_alloc_shim_is_unstable as it
// is generated by the compiler, but marked as a foreign item (hence the dllimport) in
// the standard library.
"/IGNORE:4286",
],
);
let pre_link_args = TargetOptions::link_args(LinkerFlavor::Msvc(Lld::No), &["/NOLOGO"]);
TargetOptions {
linker_flavor: LinkerFlavor::Msvc(Lld::No),