-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
A-compiler-builtinsArea: compiler-builtins (https://github.com/rust-lang/compiler-builtins)Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins)C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnullvmTarget: *-windows-gnullvmTarget: *-windows-gnullvmT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I created a new test application using cargo new testapp.
Using nightly-2025-12-23-aarch64-pc-windows-gnullvm with
[target.aarch64-pc-windows-gnullvm]
linker = "rust-lld"
in my .cargo\config.toml, I try to build my application via cargo build.
I'm reproducibly getting the error:
Compiling testapp v0.1.0 (C:\Users\Colin Finck\testapp)
error: linking with `rust-lld` failed: exit code: 1
|
= note: "rust-lld" "-flavor" "gnu" "-m" "arm64pe" "<sysroot>\\lib\\rustlib\\aarch64-pc-windows-gnullvm\\lib\\self-contained\\crt2.o" "C:\\Users\\COLINF~1\\AppData\\Local\\Temp\\rustc3UtMMj\\symbols.o" "<7 object files omitted>" "-Bstatic" "<sysroot>\\lib\\rustlib\\aarch64-pc-windows-gnullvm\\lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,libwindows_targets-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Bdynamic" "-lkernel32" "-lkernel32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-ldbghelp" "-lunwind" "-lmingw32" "-lmingwex" "-lmsvcrt" "-lkernel32" "-luser32" "--nxcompat" "-L" "<sysroot>\\lib\\rustlib\\aarch64-pc-windows-gnullvm\\lib\\self-contained" "-o" "C:\\Users\\Colin Finck\\testapp\\target\\debug\\deps\\testapp-1ac80cd7427b48a6.exe" "--gc-sections"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: rust-lld: error: undefined symbol: __chkstk
>>> referenced by /rustc/4f14395c37db4c1be874e6b0ace6721674223c22/library\std\src\sys/backtrace.rs:162
>>> libstd-51b3a38044c30c21.rlib(std-51b3a38044c30c21.std.17a6194c5b16bd2d-cgu.0.rcgu.o):(std::sys::backtrace::__rust_begin_short_backtrace::<std::sys::process::windows::child_pipe::spawn_pipe_relay::{closure#0}, ()>)
>>> referenced by C:\a\rust\rust\library\core\src\slice\sort\stable/mod.rs:94
>>> libstd-51b3a38044c30c21.rlib(std-51b3a38044c30c21.std.17a6194c5b16bd2d-cgu.0.rcgu.o):(core::slice::sort::stable::driftsort_main::<addr2line::line::LineSequence, <[addr2line::line::LineSequence]>::sort_by_key<u64, <addr2line::line::Lines>::parse<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>::{closure#1}>::{closure#0}, alloc::vec::Vec<addr2line::line::LineSequence>>)
>>> referenced by C:\a\rust\rust\library\core\src\slice\sort\stable/mod.rs:94
>>> libstd-51b3a38044c30c21.rlib(std-51b3a38044c30c21.std.17a6194c5b16bd2d-cgu.0.rcgu.o):(core::slice::sort::stable::driftsort_main::<addr2line::unit::UnitRange, <[addr2line::unit::UnitRange]>::sort_by_key<u64, <addr2line::unit::ResUnits<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>::parse::{closure#4}>::{closure#0}, alloc::vec::Vec<addr2line::unit::UnitRange>>)
>>> referenced 10 more times
error: could not compile `testapp` (bin "testapp") due to 1 previous error
This works fine for the x86_64-pc-windows-gnullvm target.
I've found similar bugs #57983 and #98254, but they deal with the aarch64-unknown-uefi target, not the aarch64-pc-windows-gnullvm one.
CC @mati865 (happy new year and thanks a lot for all your previous work on the gnullvm targets!)
Metadata
Metadata
Assignees
Labels
A-compiler-builtinsArea: compiler-builtins (https://github.com/rust-lang/compiler-builtins)Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins)C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnullvmTarget: *-windows-gnullvmTarget: *-windows-gnullvmT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.