commit b9f61d401502f5d221e72c0d0e3bf448b11dcd68 (tree)
parent 61c54b2d49bf087465e2c9a72a190e6ee5861027
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 21 Sep 2020 18:26:06 -0700
stage1: resolve builtin.zig path when bootstrapping
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git 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
@@ -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));