nixpkgs/pkgs/by-name/od/odin/darwin-remove-impure-links.patch
Ihar Hrachyshka 84b5f48c2b odin: clean up apple_sdk stubs
Also, patched out all impure paths in the linker.cpp file for darwin.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-18 21:11:18 -04:00

24 lines
1.1 KiB
Diff

diff --git a/src/linker.cpp b/src/linker.cpp
index ec165ef7d..91a28b8fc 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -769,18 +769,6 @@ try_cross_linking:;
gbString platform_lib_str = gb_string_make(heap_allocator(), "");
defer (gb_string_free(platform_lib_str));
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 ");
-
- // 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 ");
- }
-
// Only specify this flag if the user has given a minimum version to target.
// This will cause warnings to show up for mismatched libraries.
if (build_context.minimum_os_version_string_given) {