| ... | @@ -3059,7 +3059,15 @@ fn buildOutputType( | ... | @@ -3059,7 +3059,15 @@ fn buildOutputType( |
| 3059 | try test_exec_args.appendSlice(&.{ "-I", p }); | 3059 | try test_exec_args.appendSlice(&.{ "-I", p }); |
| 3060 | } | 3060 | } |
| 3061 | | 3061 | |
| 3062 | if (link_libc) try test_exec_args.append("-lc"); | 3062 | if (link_libc) { |
| | 3063 | try test_exec_args.append("-lc"); |
| | 3064 | } else if (target_info.target.os.tag == .windows) { |
| | 3065 | try test_exec_args.appendSlice(&.{ |
| | 3066 | "--subsystem", "console", |
| | 3067 | "-lkernel32", "-lntdll", |
| | 3068 | }); |
| | 3069 | } |
| | 3070 | |
| 3063 | if (!mem.eql(u8, target_arch_os_abi, "native")) { | 3071 | if (!mem.eql(u8, target_arch_os_abi, "native")) { |
| 3064 | try test_exec_args.append("-target"); | 3072 | try test_exec_args.append("-target"); |
| 3065 | try test_exec_args.append(target_arch_os_abi); | 3073 | try test_exec_args.append(target_arch_os_abi); |