aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2020-01-24 00:31:18 -0500
committerGitHub <noreply@github.com>2020-01-24 00:31:18 -0500
commitaa75df36df4a49557d5ea81b9bc256b227d6cd98 (patch)
treeb53b3e2232acc7671ff9fb1805d6552466ffae52 /src/codegen.cpp
parent3d8328abceba086ff502f38c6353792f7c590f1c (diff)
parentb54040d394830b847a7d64babac23f29fda8d47c (diff)
downloadzig-aa75df36df4a49557d5ea81b9bc256b227d6cd98.tar.gz
zig-aa75df36df4a49557d5ea81b9bc256b227d6cd98.zip
Merge pull request #4279 from mikdusan/create-global-cache
stage1: make sure to create native_libc.txt dir
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 89edfc6412..3181b45aac 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);