From ee263a15cc8fb52c2ac6053a29168fb15089839b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 11 Sep 2018 22:25:52 -0400 Subject: 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. --- src/codegen.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/codegen.cpp') 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)); -- cgit v1.2.3