diff options
| author | Anthony Arian <anthonyarian96@gmail.com> | 2020-07-20 10:25:54 +0100 |
|---|---|---|
| committer | Anthony Arian <anthonyarian96@gmail.com> | 2020-07-20 10:25:54 +0100 |
| commit | 3658dd5e89cd16c011bdc52d334c1308f440157b (patch) | |
| tree | 09564ab2db65acc4a52d82bccbf0eb572fbc865f /src/compiler.cpp | |
| parent | 68fe3e116d9c4bde67df990b8e0cbb3e70fc98b2 (diff) | |
| parent | 596ca6cf70cf43c27e31bbcfc36bcdc70b13897a (diff) | |
| download | zig-3658dd5e89cd16c011bdc52d334c1308f440157b.tar.gz zig-3658dd5e89cd16c011bdc52d334c1308f440157b.zip | |
Merge branch 'master' of https://github.com/ziglang/zig into 5002-fix-entrypoint-with-winmain
Diffstat (limited to 'src/compiler.cpp')
| -rw-r--r-- | src/compiler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler.cpp b/src/compiler.cpp index 8294fc7871..6c477a1506 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -38,11 +38,19 @@ Error get_compiler_id(Buf **result) { ZigList<Buf *> lib_paths = {}; if ((err = os_self_exe_shared_libs(lib_paths))) return err; + #if defined(ZIG_OS_DARWIN) + // only add the self exe path on mac os + Buf *lib_path = lib_paths.at(0); + if ((err = cache_add_file(ch, lib_path))) + return err; + #else for (size_t i = 0; i < lib_paths.length; i += 1) { Buf *lib_path = lib_paths.at(i); if ((err = cache_add_file(ch, lib_path))) return err; } + #endif + if ((err = cache_final(ch, &saved_compiler_id))) return err; |
