| ... | @@ -19,9 +19,7 @@ comptime { | ... | @@ -19,9 +19,7 @@ comptime { |
| 19 | // decls there get run. | 19 | // decls there get run. |
| 20 | _ = root; | 20 | _ = root; |
| 21 | | 21 | |
| 22 | if (builtin.cpu.arch == .spork8) { | 22 | if (builtin.output_mode == .Lib and builtin.link_mode == .dynamic) { |
| 23 | // always freestanding, even exes | | |
| 24 | } else if (builtin.output_mode == .Lib and builtin.link_mode == .dynamic) { | | |
| 25 | const dll_main_crt_startup = if (builtin.abi.isGnu()) "DllMainCRTStartup" else "_DllMainCRTStartup"; | 23 | const dll_main_crt_startup = if (builtin.abi.isGnu()) "DllMainCRTStartup" else "_DllMainCRTStartup"; |
| 26 | if (native_os == .windows and !builtin.link_libc and !@hasDecl(root, dll_main_crt_startup)) { | 24 | if (native_os == .windows and !builtin.link_libc and !@hasDecl(root, dll_main_crt_startup)) { |
| 27 | @export(&DllMainCRTStartup, .{ .name = dll_main_crt_startup }); | 25 | @export(&DllMainCRTStartup, .{ .name = dll_main_crt_startup }); |