aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-12-01 16:35:27 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-12-01 16:35:27 -0700
commit5b5097a22a380a93a0f205ba218e8290a42ad051 (patch)
treef51497dde95e80d10625596b6f06879ce3bde61a /src/Compilation.zig
parent8d6eff5cb97488ad79eea938fe28f4c67fd8fd19 (diff)
downloadzig-5b5097a22a380a93a0f205ba218e8290a42ad051.tar.gz
zig-5b5097a22a380a93a0f205ba218e8290a42ad051.zip
stage2: add -femit-foo=bar args to the cache hash
Closes #6979 Closes #7036
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 863cd35ba4..91a1915029 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -708,7 +708,7 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
cache.hash.add(options.link_libcpp);
cache.hash.add(options.output_mode);
cache.hash.add(options.machine_code_model);
- cache.hash.add(options.emit_bin != null);
+ cache.hash.addOptionalEmitLoc(options.emit_bin);
cache.hash.addBytes(options.root_name);
// TODO audit this and make sure everything is in it
@@ -2786,11 +2786,11 @@ fn updateStage1Module(comp: *Compilation, main_progress_node: *std.Progress.Node
man.hash.add(comp.bin_file.options.function_sections);
man.hash.add(comp.bin_file.options.is_test);
man.hash.add(comp.bin_file.options.emit != null);
- man.hash.add(comp.emit_h != null);
- man.hash.add(comp.emit_asm != null);
- man.hash.add(comp.emit_llvm_ir != null);
- man.hash.add(comp.emit_analysis != null);
- man.hash.add(comp.emit_docs != null);
+ man.hash.addOptionalEmitLoc(comp.emit_h);
+ man.hash.addOptionalEmitLoc(comp.emit_asm);
+ man.hash.addOptionalEmitLoc(comp.emit_llvm_ir);
+ man.hash.addOptionalEmitLoc(comp.emit_analysis);
+ man.hash.addOptionalEmitLoc(comp.emit_docs);
man.hash.addOptionalBytes(comp.test_filter);
man.hash.addOptionalBytes(comp.test_name_prefix);