mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 19:22:33 +00:00
Merge pull request #747 from Platin21/master
Fixes for MacOS 11 / Big Sur
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package os
|
||||
|
||||
foreign import dl "system:dl"
|
||||
foreign import libc "system:c"
|
||||
foreign import pthread "system:pthread"
|
||||
foreign import libc "System.framework"
|
||||
foreign import pthread "System.framework"
|
||||
|
||||
import "core:runtime"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package darwin;
|
||||
|
||||
foreign import "system:pthread"
|
||||
foreign import pthread "System.framework"
|
||||
|
||||
import "core:c"
|
||||
|
||||
|
||||
@@ -3,7 +3,12 @@ package time
|
||||
|
||||
IS_SUPPORTED :: true; // NOTE: Times on Darwin are UTC.
|
||||
|
||||
foreign import libc "system:c"
|
||||
when ODIN_OS == "darwin" {
|
||||
foreign import libc "System.framework"
|
||||
} else {
|
||||
foreign import libc "system:c"
|
||||
}
|
||||
|
||||
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
|
||||
12
src/main.cpp
12
src/main.cpp
@@ -432,7 +432,11 @@ i32 linker_stage(lbGenerator *gen) {
|
||||
#endif
|
||||
, linker, object_files, LIT(output_base), LIT(output_ext),
|
||||
lib_str,
|
||||
"-lc -lm",
|
||||
#if defined(GB_SYSTEM_OSX)
|
||||
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
|
||||
#else
|
||||
"-lc -lm",
|
||||
#endif
|
||||
LIT(build_context.link_flags),
|
||||
LIT(build_context.extra_linker_flags),
|
||||
link_settings);
|
||||
@@ -2195,7 +2199,11 @@ int main(int arg_count, char const **arg_ptr) {
|
||||
#endif
|
||||
, linker, LIT(output_base), LIT(output_base), LIT(output_ext),
|
||||
lib_str,
|
||||
"-lc -lm",
|
||||
#if defined(GB_SYSTEM_OSX)
|
||||
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
|
||||
#else
|
||||
"-lc -lm",
|
||||
#endif
|
||||
LIT(build_context.link_flags),
|
||||
LIT(build_context.extra_linker_flags),
|
||||
link_settings);
|
||||
|
||||
Reference in New Issue
Block a user