Auto merge of #71023 - mati865:mingw-unwind-linking-cleanup, r=Amanieu
[windows] Add testscase for self-contained executables and fix pthread linking Fixes https://github.com/rust-lang/rust/issues/71061
This commit is contained in:
commit
cc072281f9
3 changed files with 14 additions and 2 deletions
|
@ -57,9 +57,9 @@ pub fn opts() -> TargetOptions {
|
|||
// binaries to be redistributed without the libgcc_s-dw2-1.dll
|
||||
// dependency, but unfortunately break unwinding across DLL
|
||||
// boundaries when unwinding across FFI boundaries.
|
||||
"-lgcc".to_string(),
|
||||
"-lgcc_eh".to_string(),
|
||||
"-lpthread".to_string(),
|
||||
"-l:libpthread.a".to_string(),
|
||||
"-lgcc".to_string(),
|
||||
// libpthread depends on libmsvcrt, so we need to link it *again*.
|
||||
"-lmsvcrt".to_string(),
|
||||
"-lkernel32".to_string(),
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
-include ../tools.mk
|
||||
|
||||
# only-windows
|
||||
|
||||
PATH=$(SYSTEMROOT)/system32
|
||||
|
||||
all:
|
||||
$(RUSTC) hello.rs
|
||||
$(TMPDIR)/hello.exe
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello World!");
|
||||
}
|
Loading…
Add table
Reference in a new issue