diff options
| author | gingerBill <bill@gingerbill.org> | 2021-02-25 13:17:07 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-02-25 13:17:07 +0000 |
| commit | d0ac9f605d06a2017f577800b098494be95003d0 (patch) | |
| tree | 5058e1db83a7a082c04eea9cbb1fa1030876ae2c /src/main.cpp | |
| parent | 3eae69effccf9954cf911414e58394ff5def5c81 (diff) | |
| parent | 53e4c536a1458cb1b44a981a6e93790863a91188 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src/main.cpp')
| -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 bc45b80af..5e0c564c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2439,7 +2439,8 @@ int main(int arg_count, char const **arg_ptr) { // so use ld instead. // :UseLDForShared linker = "ld"; - link_settings = gb_string_appendc(link_settings, "-init '__$startup_runtime' "); + // NOTE(tetra, 2021-02-24): On Darwin, the symbol has _3_ underscores; on Linux, it only has 2. + link_settings = gb_string_append_fmt(link_settings, "-init '%s$startup_runtime' ", build_context.metrics.os == TargetOs_darwin ? "___" : "__"); // Shared libraries are .dylib on MacOS and .so on Linux. #if defined(GB_SYSTEM_OSX) output_ext = STR_LIT(".dylib"); |