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 {...@@ -647,6 +647,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
647 cache.hash.add(options.output_mode);647 cache.hash.add(options.output_mode);
648 cache.hash.add(options.machine_code_model);648 cache.hash.add(options.machine_code_model);
649 cache.hash.add(options.emit_bin != null);649 cache.hash.add(options.emit_bin != null);
650 cache.hash.addBytes(options.root_name);
650 // TODO audit this and make sure everything is in it651 // TODO audit this and make sure everything is in it
651652
652 const module: ?*Module = if (options.root_pkg) |root_pkg| blk: {653 const module: ?*Module = if (options.root_pkg) |root_pkg| blk: {