Skip to content

Instantly share code, notes, and snippets.

@jedisct1
Created July 11, 2022 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedisct1/bfd09ef7f246041b192c196af7a7ac55 to your computer and use it in GitHub Desktop.
Save jedisct1/bfd09ef7f246041b192c196af7a7ac55 to your computer and use it in GitHub Desktop.
diff --git a/src/Compilation.zig b/src/Compilation.zig
index b00f13581..4e21245f4 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -4474,7 +4474,7 @@ fn detectLibCIncludeDirs(
// If linking system libraries and targeting the native abi, default to
// using the system libc installation.
- if (link_system_libs and is_native_abi and !target.isMinGW()) {
+ if ((link_system_libs or target.isDarwin()) and is_native_abi and !target.isMinGW()) {
if (target.isDarwin()) {
return if (has_macos_sdk)
// For Darwin/macOS, we are all set with getDarwinSDK found earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment