aboutsummaryrefslogtreecommitdiff
path: root/std/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-03-23 02:59:58 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-03-23 02:59:58 -0400
commitd6856859d3082d9b66aac7c25ceb2abcd13e2f7c (patch)
treedacade36cf18d88b1c21414130b33da91d7f7784 /std/build.zig
parent01b2bf4a44c586f2fa51e8824be608b92d82fed4 (diff)
downloadzig-d6856859d3082d9b66aac7c25ceb2abcd13e2f7c.tar.gz
zig-d6856859d3082d9b66aac7c25ceb2abcd13e2f7c.zip
improvements for windows and libc integration
* standard library knows if it is linking against libc and will sometimes call libc functions in that case instead of providing redundant definitions * fix infinite loop bug when resolving use declarations * allow calling the same C function from different C imports. closes #277 * push more logic from compiler to std/bootstrap.zig * standard library provides way to access errno closes #274 * fix compile error in standard library for windows * add implementation of getRandomBytes for windows
Diffstat (limited to 'std/build.zig')
-rw-r--r--std/build.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/build.zig b/std/build.zig
index a21baa387d..f6b6f7177d 100644
--- a/std/build.zig
+++ b/std/build.zig
@@ -1,5 +1,7 @@
const mem = @import("mem.zig");
+pub const linking_libc = linkingLibrary("c");
+
pub fn linkingLibrary(lib_name: []const u8) -> bool {
// TODO shouldn't need this if
if (@compileVar("link_libs").len != 0) {