| ... | ... | @@ -1317,7 +1317,16 @@ fn buildOutputType( |
| 1317 | 1317 | }; |
| 1318 | 1318 | switch (it.zig_equivalent) { |
| 1319 | 1319 | .target => target_arch_os_abi = it.only_arg, // example: -target riscv64-linux-unknown |
| 1320 | | .o => out_path = it.only_arg, // -o |
| 1320 | .o => { |
| 1321 | // We handle -o /dev/null equivalent to -fno-emit-bin because |
| 1322 | // otherwise our atomic rename into place will fail. This also |
| 1323 | // makes Zig do less work, avoiding pointless file system operations. |
| 1324 | if (mem.eql(u8, it.only_arg, "/dev/null")) { |
| 1325 | emit_bin = .no; |
| 1326 | } else { |
| 1327 | out_path = it.only_arg; |
| 1328 | } |
| 1329 | }, |
| 1321 | 1330 | .c => c_out_mode = .object, // -c |
| 1322 | 1331 | .asm_only => c_out_mode = .assembly, // -S |
| 1323 | 1332 | .preprocess_only => c_out_mode = .preprocessor, // -E |