authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2020-12-01 17:03:56+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-12-01 11:39:15-07:00
log6bf19e32e7c51d3c3274151327af7ca3dc231510
tree466d834eb4c08d732027d02a24afc2906a83137b
parentc8b8f0ea13ee48db929e1340ee9512974ed986ee

Make sure to include the root_name in the cache.

This fixes a bug where the caching system did not notice when the --name flag changed.

1 files changed, 1 insertions(+), 0 deletions(-)

src/Compilation.zig+1
......@@ -647,6 +647,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
647647 cache.hash.add(options.output_mode);
648648 cache.hash.add(options.machine_code_model);
649649 cache.hash.add(options.emit_bin != null);
650 cache.hash.addBytes(options.root_name);
650651 // TODO audit this and make sure everything is in it
651652
652653 const module: ?*Module = if (options.root_pkg) |root_pkg| blk: {