From a17eb15e115dd104f4b0bf2b1db04c06432da324 Mon Sep 17 00:00:00 2001 From: George Roman Date: Sun, 26 Apr 2020 23:47:08 +0300 Subject: [PATCH] Add missing state to C object cache --- src/codegen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index bb189075b..366eac423 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9825,6 +9825,9 @@ Error create_c_object_cache(CodeGen *g, CacheHash **out_cache_hash, bool verbose } cache_buf(cache_hash, compiler_id); cache_int(cache_hash, g->err_color); + cache_list_of_str(cache_hash, g->framework_dirs.items, g->framework_dirs.length); + cache_bool(cache_hash, g->libcpp_link_lib != nullptr); + cache_buf(cache_hash, g->zig_lib_dir); cache_buf(cache_hash, g->zig_c_headers_dir); cache_list_of_str(cache_hash, g->libc_include_dir_list, g->libc_include_dir_len); cache_int(cache_hash, g->zig_target->is_native_os); @@ -9840,6 +9843,11 @@ Error create_c_object_cache(CodeGen *g, CacheHash **out_cache_hash, bool verbose cache_bool(cache_hash, want_valgrind_support(g)); cache_bool(cache_hash, g->function_sections); cache_int(cache_hash, g->code_model); + cache_bool(cache_hash, codegen_have_frame_pointer(g)); + cache_bool(cache_hash, g->libc_link_lib); + if (g->zig_target->cache_hash != nullptr) { + cache_mem(cache_hash, g->zig_target->cache_hash, g->zig_target->cache_hash_len); + } for (size_t arg_i = 0; arg_i < g->clang_argv_len; arg_i += 1) { cache_str(cache_hash, g->clang_argv[arg_i]);