How can I fix this link error on Windows when using 1.11 stable?


Can anyone help me with this linker error when compiling on Windows (x86_64-pc-windows-gnu and i686-pc-windows-gnu) with the following invocation:

cargo rustc --release -- -C link-args=-Wl,--out-implib,polylabel.a

note: C:\Program Files (x86)\Rust\lib\rustlib\i686-pc-windows-gnu\lib\libcore-39b92f95.rlib(core-39b92f95.0.o):(.text+0x9e4): undefined reference to `rust_begin_unwind'

(Appveyor link here)

This is only happening on Windows, using 1.11. Compilation is fine on OS X, and Linux.
(Not relevant, since I’m invoking rustc like this on Windows in order to generate def files.)