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 10:38:33-08:00
log8cbcc61c4d720d7ffa356209762e1af74661bbf8
treeefc1ffcc52747fbba164111dbc7076dcbe3e38cf
parentc7028ce0c612597b68ca900af036ec6aa5728f4f

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
......@@ -665,6 +665,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
665665 cache.hash.add(options.output_mode);
666666 cache.hash.add(options.machine_code_model);
667667 cache.hash.add(options.emit_bin != null);
668 cache.hash.addBytes(options.root_name);
668669 // TODO audit this and make sure everything is in it
669670
670671 const module: ?*Module = if (options.root_pkg) |root_pkg| blk: {