diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-07 13:16:52 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-07 13:16:52 -0500 |
| commit | 4d8467fafc5966f884325d1e3b7dae34c420fa10 (patch) | |
| tree | 2091e6fcc94ab63ca49a861fe493ddba89d5eeb6 /src/codegen.cpp | |
| parent | e2ce00f272acdf3a0b5bdb3f9322aa1c487c483d (diff) | |
| download | zig-4d8467fafc5966f884325d1e3b7dae34c420fa10.tar.gz zig-4d8467fafc5966f884325d1e3b7dae34c420fa10.zip | |
better behavior when cache dir unavailable
and choose different manifest dir for local cache to avoid
conflict with zig build
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 910f31cc04..d05f780440 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9201,11 +9201,14 @@ void codegen_build_and_link(CodeGen *g) { bool any_c_objects_generated; if (g->enable_cache) { Buf *manifest_dir = buf_alloc(); - os_path_join(g->cache_dir, buf_create_from_str("build"), manifest_dir); + os_path_join(g->cache_dir, buf_create_from_str("h"), manifest_dir); if ((err = check_cache(g, manifest_dir, &digest, &any_c_objects_generated))) { if (err == ErrorCacheUnavailable) { // message already printed + } else if (err == ErrorNotDir) { + fprintf(stderr, "Unable to check cache: %s is not a directory\n", + buf_ptr(manifest_dir)); } else { fprintf(stderr, "Unable to check cache: %s\n", err_str(err)); } |
