diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-24 15:19:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-24 15:19:31 -0700 |
| commit | a9af4727286734cd9b05d3b031e6d5c1834a6a8b (patch) | |
| tree | 1fa7cc529ef59d91240184a2eac123a7c308ed88 /src/Compilation.zig | |
| parent | 07afd5bdbaef991a177e2df03af0502fce5dde23 (diff) | |
| download | zig-a9af4727286734cd9b05d3b031e6d5c1834a6a8b.tar.gz zig-a9af4727286734cd9b05d3b031e6d5c1834a6a8b.zip | |
Compilation: move comptime condition first
Avoids compile error on Windows due to not having execv capabilities.
Fixup for eb3f7d2f37cab1d3df7c4493b8239e802b83e521.
See #6768
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 1b424a4001..d6bf121adb 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3767,7 +3767,9 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: *std.P // that we could "tail call" clang by doing an execve, and any use of // the caching system would actually be problematic since the user is // presumably doing their own caching by using dep file flags. - if (comp.disable_c_depfile and comp.clang_passthrough_mode and std.process.can_execv and direct_o) { + if (std.process.can_execv and direct_o and + comp.disable_c_depfile and comp.clang_passthrough_mode) + { try comp.addCCArgs(arena, &argv, ext, null); const out_obj_path = if (comp.bin_file.options.emit) |emit| |
