aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorJonathan Marler <johnnymarler@gmail.com>2019-06-16 21:58:05 -0600
committerAndrew Kelley <andrew@ziglang.org>2019-06-17 14:10:10 -0400
commit21dff1c4e280663c7a637f3b014c0d7326efcd3d (patch)
treee6662c17622f430e758ac5210658dca9765c218a /src/codegen.cpp
parentd5d0942a0dd5366e7e9a0843bf40878e6f0e1f2c (diff)
downloadzig-21dff1c4e280663c7a637f3b014c0d7326efcd3d.tar.gz
zig-21dff1c4e280663c7a637f3b014c0d7326efcd3d.zip
Remove duplicate exe name with zig run
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index cee8c0ec0c..3dd6995c61 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8801,6 +8801,7 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
Termination term;
ZigList<const char *> args = {};
+ args.append(buf_ptr(self_exe_path));
args.append("cc");
Buf *out_dep_path = buf_sprintf("%s.d", buf_ptr(out_obj_path));
@@ -8819,7 +8820,7 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
if (g->verbose_cc) {
print_zig_cc_cmd("zig", &args);
}
- os_spawn_process(buf_ptr(self_exe_path), args, &term);
+ os_spawn_process(args, &term);
if (term.how != TerminationIdClean || term.code != 0) {
fprintf(stderr, "\nThe following command failed:\n");
print_zig_cc_cmd(buf_ptr(self_exe_path), &args);