rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.2k stars 12.7k forks source link

`armv7k-apple-watchos` fails to link #130071

Closed madsmtm closed 1 month ago

madsmtm commented 1 month ago

Building project using armv7k-apple-watchos should just work, but instead it fails to link to the _Unwind_VRS_Get and _Unwind_VRS_Set symbols.

$ cargo new foo && cd foo && cargo +nightly build --target=armv7k-apple-watchos -Zbuild-std
// Or
$ ./x test --target=armv7k-apple-watchos

The exact error is:

  = note: clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
          ld: warning: CPU_SUBTYPE_ARM_ALL subtype is deprecated: /var/folders/0j/tk3sfgz540712zgqd1hrry0m0000gn/T/rustczhiAuB/symbols.o
          Undefined symbols for architecture armv7k:
            "__Unwind_VRS_Get", referenced from:
                unwind::libunwind::_Unwind_GetGR::h26feaf89fa048a08 in libunwind-839951f2536ba1be.rlib(unwind-839951f2536ba1be.unwind.e3a3afb176a39428-cgu.0.rcgu.o)
            "__Unwind_VRS_Set", referenced from:
                unwind::libunwind::_Unwind_SetGR::h82dc8386fcb66bbf in libunwind-839951f2536ba1be.rlib(unwind-839951f2536ba1be.unwind.e3a3afb176a39428-cgu.0.rcgu.o)
            "___gnu_unwind_frame", referenced from:
                std::sys::personality::gcc::rust_eh_personality::continue_unwind::hc8efd93df824e471 in libstd-ee4f137c874f1c8a.rlib(std-ee4f137c874f1c8a.std.ffd53844a8cf2cc0-cgu.12.rcgu.o)
          ld: symbol(s) not found for architecture armv7k
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Meta

rustc +nightly --version --verbose:

rustc 1.83.0-nightly (26b5599e4 2024-09-06)
binary: rustc
commit-hash: 26b5599e4d6ed2b45152c60493c1788c0a27533d
commit-date: 2024-09-06
host: aarch64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0

This worked with +nightly-2024-01-15, I'll try to bisect it myself.

@rustbot label O-watchos

madsmtm commented 1 month ago

Ugh, don't you just love it when the culprit is yourself? It's https://github.com/rust-lang/rust/pull/124748