diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-03-22 11:26:30 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-03-22 11:26:30 -0400 |
| commit | 87bc97daefc8b5d8b665ea2fb2b6c232b80344bc (patch) | |
| tree | edf82e24345f0049fb930cdec36aa299b42c3ca5 /std/build.zig | |
| parent | e1c47d6fe88bb1d79a4484e07d21f126ca9f1003 (diff) | |
| download | zig-87bc97daefc8b5d8b665ea2fb2b6c232b80344bc.tar.gz zig-87bc97daefc8b5d8b665ea2fb2b6c232b80344bc.zip | |
unify main entry point regardless of whether linking libc
closes #248
Diffstat (limited to 'std/build.zig')
| -rw-r--r-- | std/build.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/std/build.zig b/std/build.zig new file mode 100644 index 0000000000..a21baa387d --- /dev/null +++ b/std/build.zig @@ -0,0 +1,13 @@ +const mem = @import("mem.zig"); + +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; +} |
