diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-03-26 06:39:28 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-03-26 06:39:28 -0400 |
| commit | 5bc9feb5cb98fc13db62d01b2b9fec15677310a7 (patch) | |
| tree | 12972dfc1f9b964bb74428ec0d6766e77b9b0be7 /std/target.zig | |
| parent | 7ce753a16b0c16b4c6494467f42f2d5fe9a235e6 (diff) | |
| download | zig-5bc9feb5cb98fc13db62d01b2b9fec15677310a7.tar.gz zig-5bc9feb5cb98fc13db62d01b2b9fec15677310a7.zip | |
organize std and make import relative to current file
closes #216
Diffstat (limited to 'std/target.zig')
| -rw-r--r-- | std/target.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/std/target.zig b/std/target.zig new file mode 100644 index 0000000000..f6b6f7177d --- /dev/null +++ b/std/target.zig @@ -0,0 +1,15 @@ +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) { + for (@compileVar("link_libs")) |link_lib| { + if (mem.eql(u8, link_lib, lib_name)) { + return true; + } + } + } + return false; +} |
