aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-24 00:54:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-24 01:00:15 -0700
commitef7fa76001f873824b0f64dfc2172ed2f304c348 (patch)
treeea739ef9170f446568c6a328ff9428f78c0ad165 /src/link.zig
parentf215d98043ef948a996ac036609f4b71fa9c3c13 (diff)
downloadzig-ef7fa76001f873824b0f64dfc2172ed2f304c348.tar.gz
zig-ef7fa76001f873824b0f64dfc2172ed2f304c348.zip
stage2: enable building freestanding libc with LLVM backend
* LLVM backend: respect `sub_path` just like the other stage2 backends do. * Compilation has some new logic to only emit work queue jobs for building stuff when it believes itself to be capable. The linker backends no longer have duplicate logic; instead they respect the optional bit on the respective asset.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index 4f21a10d18..fe233e060f 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -245,6 +245,9 @@ pub const File = struct {
};
if (use_lld) {
+ // TODO this intermediary_basename isn't enough; in the case of `zig build-exe`,
+ // we also want to put the intermediary object file in the cache while the
+ // main emit directory is the cwd.
file.intermediary_basename = sub_path;
}