Skip to content

Commit 8f068fd

Browse files
committed
Don't reject -L/usr/local/lib when SDKROOT is defined
/usr/local/lib is removed from the default linker search path when SDKROOT is defined or sysroot is specified. Homebrew sometimes sets SDKROOT without setting a sysroot as of 45e138f.
1 parent c39f0ba commit 8f068fd

File tree

1 file changed

+3
-1
lines changed
  • Library/Homebrew/shims/super

1 file changed

+3
-1
lines changed

Library/Homebrew/shims/super/cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ class Cmd
279279
end
280280
281281
def system_library_paths
282-
%W[#{sysroot}/usr/lib /usr/local/lib]
282+
paths = ["#{sysroot}/usr/lib"]
283+
paths << "/usr/local/lib" unless sysroot || ENV["SDKROOT"]
284+
paths
283285
end
284286
285287
def configure?

0 commit comments

Comments
 (0)