diff --git a/BRANCH_TODO b/BRANCH_TODO index 920c6f04c6..ae725e118a 100644 --- a/BRANCH_TODO +++ b/BRANCH_TODO @@ -1,4 +1,3 @@ - * resolve builtin.zig not working on windows & macos; try os_path_real * build & link against libcxx and libcxxabi * `zig test` * `zig build` diff --git a/src/codegen.cpp b/src/codegen.cpp index 6768021410..0a8a1f7a95 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8861,6 +8861,9 @@ static Error define_builtin_compile_vars(CodeGen *g) { g->builtin_zig_path = buf_alloc(); os_path_join(g->output_dir, buf_create_from_str(builtin_zig_basename), g->builtin_zig_path); + Buf *resolve_paths[] = { g->builtin_zig_path, }; + *g->builtin_zig_path = os_path_resolve(resolve_paths, 1); + contents = codegen_generate_builtin_source(g); if ((err = os_write_file(g->builtin_zig_path, contents))) { fprintf(stderr, "Unable to write file '%s': %s\n", buf_ptr(g->builtin_zig_path), err_str(err));