aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/codegen/wasm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-13 19:17:58 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-13 19:29:07 -0700
commit2a8fc1a18e7d9017262f5c7ee9669ca7d80ebaa6 (patch)
tree34907cfbd9ede1ef1c86d97a9c9ead7948ec2509 /src-self-hosted/codegen/wasm.zig
parent1baa56a25f7b4cf7b3e0a78ded90c432a40c4efa (diff)
downloadzig-2a8fc1a18e7d9017262f5c7ee9669ca7d80ebaa6.tar.gz
zig-2a8fc1a18e7d9017262f5c7ee9669ca7d80ebaa6.zip
stage2: caching system integration & Module/Compilation splitting
* update to the new cache hash API * std.Target defaultVersionRange moves to std.Target.Os.Tag * std.Target.Os gains getVersionRange which returns a tagged union * start the process of splitting Module into Compilation and "zig module". - The parts of Module having to do with only compiling zig code are extracted into ZigModule.zig. - Next step is to rename Module to Compilation. - After that rename ZigModule back to Module. * implement proper cache hash usage when compiling C objects, and properly manage the file lock of the build artifacts. * make versions optional to match recent changes to master branch. * proper cache hash integration for compiling zig code * proper cache hash integration for linking even when not compiling zig code. * ELF LLD linking integrates with the caching system. A comment from the source code: Here we want to determine whether we can save time by not invoking LLD when the output is unchanged. None of the linker options or the object files that are being linked are in the hash that namespaces the directory we are outputting to. Therefore, we must hash those now, and the resulting digest will form the "id" of the linking job we are about to perform. After a successful link, we store the id in the metadata of a symlink named "id.txt" in the artifact directory. So, now, we check if this symlink exists, and if it matches our digest. If so, we can skip linking. Otherwise, we proceed with invoking LLD. * implement disable_c_depfile option * add tracy to a few more functions
Diffstat (limited to 'src-self-hosted/codegen/wasm.zig')
-rw-r--r--src-self-hosted/codegen/wasm.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src-self-hosted/codegen/wasm.zig b/src-self-hosted/codegen/wasm.zig
index e55e904934..5f44aa8c65 100644
--- a/src-self-hosted/codegen/wasm.zig
+++ b/src-self-hosted/codegen/wasm.zig
@@ -5,7 +5,8 @@ const assert = std.debug.assert;
const leb = std.debug.leb;
const mem = std.mem;
-const Decl = @import("../Module.zig").Decl;
+const Module = @import("../ZigModule.zig");
+const Decl = Module.Decl;
const Inst = @import("../ir.zig").Inst;
const Type = @import("../type.zig").Type;
const Value = @import("../value.zig").Value;