diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-11 22:25:52 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-11 22:25:52 -0400 |
| commit | ee263a15cc8fb52c2ac6053a29168fb15089839b (patch) | |
| tree | 54f95fe907951f15648a157a03ad2c3835b6f0c6 /src/codegen.cpp | |
| parent | 25466ffb71d653e3353bf6d86ef55bc2a4da1d59 (diff) | |
| download | zig-ee263a15cc8fb52c2ac6053a29168fb15089839b.tar.gz zig-ee263a15cc8fb52c2ac6053a29168fb15089839b.zip | |
bring back zig-cache
we need somewhere to put .o files and leave them while the user
executes their program, so that stack traces on MacOS can find
the .o files and get at the DWARF info.
if we try to clean up old global tmp dir files, first of all that's
a hard and complicated problem, and secondly it's not clear how
that is better than dumping the .o file inside zig-cache locally.
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 96e979f9d3..aeb2b6edc4 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8195,8 +8195,6 @@ void codegen_build_and_link(CodeGen *g) { } os_path_join(stage1_dir, buf_create_from_str("artifact"), artifact_dir); - } else { - os_path_join(stage1_dir, buf_create_from_str("tmp"), artifact_dir); } if (g->enable_cache && buf_len(&digest) != 0) { @@ -8217,8 +8215,7 @@ void codegen_build_and_link(CodeGen *g) { } os_path_join(artifact_dir, &digest, &g->artifact_dir); } else { - Buf *tmp_basename = get_random_basename(); - os_path_join(artifact_dir, tmp_basename, &g->artifact_dir); + buf_init_from_buf(&g->artifact_dir, &g->cache_dir); } if ((err = os_make_path(&g->artifact_dir))) { fprintf(stderr, "Unable to create artifact directory: %s\n", err_str(err)); |
