ability to disable cache. off by default except for...

...zig run, zig build, compiler_rt.a, and builtin.a
This commit is contained in:
Andrew Kelley
2018-09-11 00:32:40 -04:00
parent 5ee5933ade
commit 67735c6f15
11 changed files with 167 additions and 35 deletions

View File

@@ -467,3 +467,11 @@ void cache_release(CacheHash *ch) {
assert(ch->manifest_file_path != nullptr);
os_file_close(ch->manifest_file);
}
Buf *get_random_basename() {
Buf *result = buf_alloc();
for (size_t i = 0; i < 16; i += 1) {
buf_append_char(result, base64_fs_alphabet[rand() % 64]);
}
return result;
}