aboutsummaryrefslogtreecommitdiff
path: root/std/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-12-26 19:44:08 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-12-26 19:44:08 -0500
commit6fece14cfbb852c108c2094ae0879da76f2f445e (patch)
treec2cde629583a94556d65dbc376e0809124550828 /std/build.zig
parent2a25398c869fcdefe8b6508974a5c463ca833520 (diff)
downloadzig-6fece14cfbb852c108c2094ae0879da76f2f445e.tar.gz
zig-6fece14cfbb852c108c2094ae0879da76f2f445e.zip
self-hosted: build against zig_llvm and embedded LLD
Now the self-hosted compiler re-uses the same C++ code for interfacing with LLVM as the C++ code. It also links against the same LLD library files.
Diffstat (limited to 'std/build.zig')
-rw-r--r--std/build.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/std/build.zig b/std/build.zig
index 3a2079db15..bb5280837f 100644
--- a/std/build.zig
+++ b/std/build.zig
@@ -784,6 +784,13 @@ const Target = union(enum) {
};
}
+ pub fn libFileExt(self: &const Target) -> []const u8 {
+ return switch (self.getOs()) {
+ builtin.Os.windows => ".lib",
+ else => ".a",
+ };
+ }
+
pub fn getOs(self: &const Target) -> builtin.Os {
return switch (*self) {
Target.Native => builtin.os,