| ... | @@ -38,11 +38,19 @@ Error get_compiler_id(Buf **result) { | ... | @@ -38,11 +38,19 @@ Error get_compiler_id(Buf **result) { |
| 38 | ZigList<Buf *> lib_paths = {}; | 38 | ZigList<Buf *> lib_paths = {}; |
| 39 | if ((err = os_self_exe_shared_libs(lib_paths))) | 39 | if ((err = os_self_exe_shared_libs(lib_paths))) |
| 40 | return err; | 40 | return err; |
| | 41 | #if defined(ZIG_OS_DARWIN) |
| | 42 | // only add the self exe path on mac os |
| | 43 | Buf *lib_path = lib_paths.at(0); |
| | 44 | if ((err = cache_add_file(ch, lib_path))) |
| | 45 | return err; |
| | 46 | #else |
| 41 | for (size_t i = 0; i < lib_paths.length; i += 1) { | 47 | for (size_t i = 0; i < lib_paths.length; i += 1) { |
| 42 | Buf *lib_path = lib_paths.at(i); | 48 | Buf *lib_path = lib_paths.at(i); |
| 43 | if ((err = cache_add_file(ch, lib_path))) | 49 | if ((err = cache_add_file(ch, lib_path))) |
| 44 | return err; | 50 | return err; |
| 45 | } | 51 | } |
| | 52 | #endif |
| | 53 | |
| 46 | if ((err = cache_final(ch, &saved_compiler_id))) | 54 | if ((err = cache_final(ch, &saved_compiler_id))) |
| 47 | return err; | 55 | return err; |
| 48 | | 56 | |