mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
use '___$startup_runtime' for MacOS
MacOS needs 3 underscores unlike the 2 needed by Linux.
This commit is contained in:
+2
-1
@@ -439,13 +439,14 @@ i32 linker_stage(lbGenerator *gen) {
|
|||||||
// so use ld instead.
|
// so use ld instead.
|
||||||
// :UseLDForShared
|
// :UseLDForShared
|
||||||
linker = "ld";
|
linker = "ld";
|
||||||
link_settings = gb_string_appendc(link_settings, "-init '__$startup_runtime' ");
|
|
||||||
// Shared libraries are .dylib on MacOS and .so on Linux.
|
// Shared libraries are .dylib on MacOS and .so on Linux.
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
output_ext = STR_LIT(".dylib");
|
output_ext = STR_LIT(".dylib");
|
||||||
|
link_settings = gb_string_appendc(link_settings, "-init '___$startup_runtime' ");
|
||||||
link_settings = gb_string_appendc(link_settings, "-dylib -dynamic ");
|
link_settings = gb_string_appendc(link_settings, "-dylib -dynamic ");
|
||||||
#else
|
#else
|
||||||
output_ext = STR_LIT(".so");
|
output_ext = STR_LIT(".so");
|
||||||
|
link_settings = gb_string_appendc(link_settings, "-init '__$startup_runtime' ");
|
||||||
link_settings = gb_string_appendc(link_settings, "-shared ");
|
link_settings = gb_string_appendc(link_settings, "-shared ");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user