aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-25 18:01:35 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-25 18:01:35 -0700
commit70d7d7e919d7f297e63ca421f6be5925259136e2 (patch)
tree1635b864f21a78a8d273fa9a946191a8b9796e8b /src/link.zig
parent670e7d456c24a8597af6b3809bf1e9ea68746ade (diff)
downloadzig-70d7d7e919d7f297e63ca421f6be5925259136e2.tar.gz
zig-70d7d7e919d7f297e63ca421f6be5925259136e2.zip
stage2: disable lld caching when output dir is owned by user
Normally when using LLD to link, Zig uses a file named "lld.id" in the same directory as the output binary which contains the hash of the link operation, allowing Zig to skip linking when the hash would be unchanged. In the case that the output binary is being emitted into a directory which is externally modified - essentially anything other than zig-cache - then this flag would be set to disable this machinery to avoid false positives. * Better defaults when using -fno-LLVM * Fix compiler_rt and libc static libraries were getting a .zig extension instead of .a extension. * when using the stage1 backend, put the object file next to the stage1.id file in the cache directory. this prevents an object file from polluting the cwd when using zig from the CLI.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index 82d67f2a7a..4c485063bd 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -66,6 +66,7 @@ pub const Options = struct {
error_return_tracing: bool,
is_compiler_rt_or_libc: bool,
each_lib_rpath: bool,
+ disable_lld_caching: bool,
gc_sections: ?bool = null,
allow_shlib_undefined: ?bool = null,
linker_script: ?[]const u8 = null,