diff options
| author | Wes Hardee <weshardee@gmail.com> | 2021-12-18 12:43:24 -0600 |
|---|---|---|
| committer | Wes Hardee <weshardee@gmail.com> | 2021-12-18 12:43:24 -0600 |
| commit | a48317deee95b956430ace83f0db3e34bef590dd (patch) | |
| tree | ddb275b12d95f3bae804c315f5cfbd8f683bd4d0 | |
| parent | 9d4fe9035626f4f36ae84ca731ffc5fca00ebe17 (diff) | |
use '___$startup_runtime' for MacOS
MacOS needs 3 underscores unlike the 2 needed by Linux.
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7b4bc92ee..36b30112f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -439,13 +439,14 @@ i32 linker_stage(lbGenerator *gen) { // so use ld instead. // :UseLDForShared linker = "ld"; - link_settings = gb_string_appendc(link_settings, "-init '__$startup_runtime' "); // Shared libraries are .dylib on MacOS and .so on Linux. #if defined(GB_SYSTEM_OSX) output_ext = STR_LIT(".dylib"); + link_settings = gb_string_appendc(link_settings, "-init '___$startup_runtime' "); link_settings = gb_string_appendc(link_settings, "-dylib -dynamic "); #else output_ext = STR_LIT(".so"); + link_settings = gb_string_appendc(link_settings, "-init '__$startup_runtime' "); link_settings = gb_string_appendc(link_settings, "-shared "); #endif } else { |