mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Fix for local/lib linking from brew for macOS
This commit is contained in:
+4
-4
@@ -431,19 +431,19 @@ i32 linker_stage(lbGenerator *gen) {
|
|||||||
" -e _main "
|
" -e _main "
|
||||||
#endif
|
#endif
|
||||||
, linker, object_files, LIT(output_base), LIT(output_ext),
|
, linker, object_files, LIT(output_base), LIT(output_ext),
|
||||||
lib_str,
|
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
|
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -L/usr/local/lib",
|
||||||
#else
|
#else
|
||||||
"-lc -lm",
|
"-lc -lm",
|
||||||
#endif
|
#endif
|
||||||
|
lib_str,
|
||||||
LIT(build_context.link_flags),
|
LIT(build_context.link_flags),
|
||||||
LIT(build_context.extra_linker_flags),
|
LIT(build_context.extra_linker_flags),
|
||||||
link_settings);
|
link_settings);
|
||||||
if (exit_code != 0) {
|
if (exit_code != 0) {
|
||||||
return exit_code;
|
return exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
if (build_context.ODIN_DEBUG) {
|
if (build_context.ODIN_DEBUG) {
|
||||||
// NOTE: macOS links DWARF symbols dynamically. Dsymutil will map the stubs in the exe
|
// NOTE: macOS links DWARF symbols dynamically. Dsymutil will map the stubs in the exe
|
||||||
@@ -2221,7 +2221,7 @@ int main(int arg_count, char const **arg_ptr) {
|
|||||||
, linker, LIT(output_base), LIT(output_base), LIT(output_ext),
|
, linker, LIT(output_base), LIT(output_base), LIT(output_ext),
|
||||||
lib_str,
|
lib_str,
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
|
"-lSystem -lm -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib",
|
||||||
#else
|
#else
|
||||||
"-lc -lm",
|
"-lc -lm",
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user