mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
darwin: add library paths for default Homebrew and MacPorts locations
This commit is contained in:
@@ -484,6 +484,17 @@ gb_internal i32 linker_stage(LinkerData *gen) {
|
|||||||
defer (gb_string_free(platform_lib_str));
|
defer (gb_string_free(platform_lib_str));
|
||||||
if (build_context.metrics.os == TargetOs_darwin) {
|
if (build_context.metrics.os == TargetOs_darwin) {
|
||||||
platform_lib_str = gb_string_appendc(platform_lib_str, "-Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib");
|
platform_lib_str = gb_string_appendc(platform_lib_str, "-Wl,-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -L/usr/local/lib");
|
||||||
|
|
||||||
|
// Homebrew's default library path, checking if it exists to avoid linking warnings.
|
||||||
|
if (gb_file_exists("/opt/homebrew/lib")) {
|
||||||
|
platform_lib_str = gb_string_appendc(platform_lib_str, " -L/opt/homebrew/lib");
|
||||||
|
}
|
||||||
|
|
||||||
|
// MacPort's default library path, checking if it exists to avoid linking warnings.
|
||||||
|
if (gb_file_exists("/opt/local/lib")) {
|
||||||
|
platform_lib_str = gb_string_appendc(platform_lib_str, " -L/opt/local/lib");
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(GB_SYSTEM_OSX)
|
#if defined(GB_SYSTEM_OSX)
|
||||||
if(!build_context.no_crt) {
|
if(!build_context.no_crt) {
|
||||||
platform_lib_str = gb_string_appendc(platform_lib_str, " -lm ");
|
platform_lib_str = gb_string_appendc(platform_lib_str, " -lm ");
|
||||||
|
|||||||
Reference in New Issue
Block a user