aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2020-01-23 21:56:53 -0500
committerMichael Dusan <michael.dusan@gmail.com>2020-01-23 21:59:28 -0500
commitb54040d394830b847a7d64babac23f29fda8d47c (patch)
tree1e7b02d54460e79cffa71b7f97042f543e5ff3ac /src/codegen.cpp
parent357f42da6c2f158fff2afa28a56b7e0e7a8a5963 (diff)
downloadzig-b54040d394830b847a7d64babac23f29fda8d47c.tar.gz
zig-b54040d394830b847a7d64babac23f29fda8d47c.zip
stage1: make sure to create native_libc.txt dir
- fix regression from #4186
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 3d4d2a8c31..7546025e72 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8996,7 +8996,10 @@ static void detect_libc(CodeGen *g) {
"See `zig libc --help` for more details.\n", err_str(err));
exit(1);
}
- if ((err = os_make_path(g->cache_dir))) {
+ Buf libc_txt_dir = BUF_INIT;
+ os_path_dirname(libc_txt, &libc_txt_dir);
+ buf_deinit(&libc_txt_dir);
+ if ((err = os_make_path(&libc_txt_dir))) {
fprintf(stderr, "Unable to create %s directory: %s\n",
buf_ptr(g->cache_dir), err_str(err));
exit(1);