authorgravatar for shritesh@shritesh.comShritesh Bhattarai <shritesh@shritesh.com> 2019-04-10 19:05:05-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-10 20:07:35-04:00
log13798d26c769323ab2a7798c27a8c62af32fd60c
tree0c89e0c567c62a06317b316873614554de4f337b
parent666e8799251452f74ca97b4a6a930c7b3d0ce553

pass exec_path to zig run


1 files changed, 3 insertions(+), 2 deletions(-)

src/main.cpp+3-2
......@@ -1144,14 +1144,15 @@ int main(int argc, char **argv) {
11441144 codegen_print_timing_report(g, stdout);
11451145
11461146 if (cmd == CmdRun) {
1147 const char *exec_path = buf_ptr(&g->output_file_path);
11471148 ZigList<const char*> args = {0};
1149
1150 args.append(exec_path);
11481151 if (runtime_args_start != -1) {
11491152 for (int i = runtime_args_start; i < argc; ++i) {
11501153 args.append(argv[i]);
11511154 }
11521155 }
1153
1154 const char *exec_path = buf_ptr(&g->output_file_path);
11551156 args.append(nullptr);
11561157
11571158 os_execv(exec_path, args.items);