Skip to content

Commit 1756058

Browse files
committed
Subsystem 为 Windows 时指定 /ENTRY:mainCRTStartup
1 parent d956c2d commit 1756058

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ impl ThunkBuilder {
7575

7676
if let Some(args) = subsystem_args {
7777
rust_flags.push(args.into());
78+
79+
if let Some(Subsystem::Windows) = subsystem {
80+
rust_flags.push("-Clink-args=/ENTRY:mainCRTStartup".into())
81+
}
7882
}
7983

8084
let thunks_obj = match os {

0 commit comments

Comments
 (0)