aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/shims
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/shims')
-rwxr-xr-xLibrary/Homebrew/shims/super/cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc
index e7ab6500f..8404e29f2 100755
--- a/Library/Homebrew/shims/super/cc
+++ b/Library/Homebrew/shims/super/cc
@@ -258,8 +258,10 @@ class Cmd
case mode
when :ld
args << "-headerpad_max_install_names"
+ args << "-no_weak_imports" if no_weak_imports?
when :ccld, :cxxld
args << "-Wl,-headerpad_max_install_names"
+ args << "-Wl,-no_weak_imports" if no_weak_imports?
end
args
end
@@ -305,6 +307,10 @@ class Cmd
config.include?("K")
end
+ def no_weak_imports?
+ config.include?("w")
+ end
+
def canonical_path(path)
path = Pathname.new(path)
path = path.realpath if path.exist?