diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-16 01:49:57 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:20 -0700 |
| commit | 0be97b5ae3d32ca9cd7fbb68d5972538b48d8c76 (patch) | |
| tree | d0f1d642243f9cecb35ef481844c959151e9942d /src/Compilation.zig | |
| parent | d71e6273b6acd766eea6c37b8f53ae03cb2bd9f6 (diff) | |
| download | zig-0be97b5ae3d32ca9cd7fbb68d5972538b48d8c76.tar.gz zig-0be97b5ae3d32ca9cd7fbb68d5972538b48d8c76.zip | |
fix population of builtin.zig not making the parent dir
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index fb6e5a44b0..20e2d1ce53 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1119,6 +1119,11 @@ fn addModuleTableToCacheHash( var i: usize = 0; while (i < seen_table.count()) : (i += 1) { const mod = seen_table.keys()[i]; + if (mod.isBuiltin()) { + // Skip builtin.zig; it is useless as an input, and we don't want to + // have to write it before checking for a cache hit. + continue; + } cache_helpers.addResolvedTarget(hash, mod.resolved_target); hash.add(mod.optimize_mode); @@ -1133,6 +1138,8 @@ fn addModuleTableToCacheHash( hash.add(mod.red_zone); hash.add(mod.sanitize_c); hash.add(mod.sanitize_thread); + hash.add(mod.unwind_tables); + hash.add(mod.structured_cfg); switch (hash_type) { .path_bytes => { @@ -2371,7 +2378,6 @@ pub const link_hash_implementation_version = 10; fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifest) !void { const gpa = comp.gpa; - const target = comp.getTarget(); var arena_allocator = std.heap.ArenaAllocator.init(gpa); defer arena_allocator.deinit(); @@ -2432,6 +2438,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes man.hash.add(comp.include_compiler_rt); if (comp.config.link_libc) { man.hash.add(comp.libc_installation != null); + const target = comp.root_mod.resolved_target.result; if (comp.libc_installation) |libc_installation| { man.hash.addOptionalBytes(libc_installation.crt_dir); if (target.abi == .msvc) { |
