aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/shims
diff options
context:
space:
mode:
authorMike McQuaid2016-08-17 12:22:28 +0100
committerGitHub2016-08-17 12:22:28 +0100
commit6878577d129833b59f82c4872b49e97ba5cec499 (patch)
tree648c8479832ec3694e7fbec6c9ed455a0b1a31c2 /Library/Homebrew/shims
parentcf71e30180d44219836ef129d5e5f00325210dfb (diff)
parent560918356738ee71aa7e7110d0e8aa6c8b3dbe4f (diff)
downloadbrew-6878577d129833b59f82c4872b49e97ba5cec499.tar.bz2
Merge pull request #721 from MikeMcQuaid/no_weak_imports
Set -no_weak_imports linker flag for Xcode 8
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 a016af777..10b39bde2 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?