Open
Description
Trying to cross-compile libcore for aarch64-pc-windows-msvc
fails with (see also #54190 (comment)):
Building stage2 test artifacts (x86_64-pc-windows-msvc -> aarch64-pc-windows-msvc)
Compiling term v0.0.0 (file:///C:/msys64/home/mw/2-rust/src/libterm)
Compiling getopts v0.2.17
Compiling test v0.0.0 (file:///C:/msys64/home/mw/2-rust/src/libtest)
error: cannot link together two panic runtimes: panic_abort and panic_unwind
error: aborting due to previous error
error: Could not compile `test`.
(Note, one has to use link.exe
instead of LLD as the linker (see #54290) in order to get that far.)
The underlying problem is (probably) that aarch64-pc-windows-msvc
defaults to panic_abort
, while libstd
is unconditionally compiled with panic_unwind
. All other targets that hard-code panic_abort
are probably #[no_std]
?
Making aarch64-pc-windows-msvc
use panic_unwind
like the other non-embedded platforms leads to LLVM running into an error while trying to compile libcore
:
Compiling core v0.0.0 (file:///C:/msys64/home/mw/2-rust/src/libcore)
LLVM ERROR: Cannot select: t10: ch = cleanupret t9, libcore\str\mod.rs:3734 @[ libcore\str\mod.rs:3563 ]
In function: _ZN4core3str21_$LT$impl$u20$str$GT$4trim17hd88bcddf6e49abc8E
error: Could not compile `core`.