aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorLayne Gustafson <lgustaf1@binghamton.edu>2019-12-21 21:18:05 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-19 20:53:19 -0500
commitb3324f1901ab9eb7321ad65161e6e07047284cab (patch)
treef3e6a06b8d86105e8c70fd1c8696c6648c6ab204 /src/codegen.cpp
parentbd6ef21f8556b3872c5780eee70621e6c66a0aa4 (diff)
downloadzig-b3324f1901ab9eb7321ad65161e6e07047284cab.tar.gz
zig-b3324f1901ab9eb7321ad65161e6e07047284cab.zip
Add cpu/feature to cache hash
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 43fc002a12..798f406c8e 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8655,6 +8655,8 @@ static Error define_builtin_compile_vars(CodeGen *g) {
cache_bool(&cache_hash, g->valgrind_support);
cache_bool(&cache_hash, g->link_eh_frame_hdr);
cache_int(&cache_hash, detect_subsystem(g));
+ if (g->llvm_cpu) cache_str(&cache_hash, g->llvm_cpu);
+ if (g->llvm_features) cache_str(&cache_hash, g->llvm_features);
Buf digest = BUF_INIT;
buf_resize(&digest, 0);
@@ -10388,6 +10390,8 @@ static Error check_cache(CodeGen *g, Buf *manifest_dir, Buf *digest) {
}
cache_buf_opt(ch, g->dynamic_linker_path);
cache_buf_opt(ch, g->version_script_path);
+ if (g->llvm_cpu) cache_str(ch, g->llvm_cpu);
+ if (g->llvm_features) cache_str(ch, g->llvm_features);
// gen_c_objects appends objects to g->link_objects which we want to include in the hash
gen_c_objects(g);