Merge pull request #741 from tdsmith/weak-imports-opt-in

Add permit_weak_imports directive
This commit is contained in:
Mike McQuaid 2016-08-19 16:19:56 +01:00 committed by GitHub
commit 893c80d3ba
4 changed files with 11 additions and 0 deletions

View File

@ -293,6 +293,8 @@ module SharedEnvExtension
def permit_arch_flags; end
def permit_weak_imports; end
private
def cc=(val)

View File

@ -78,6 +78,7 @@ module Superenv
# g - Enable "-stdlib=libc++" for clang.
# h - Enable "-stdlib=libstdc++" for clang.
# K - Don't strip -arch <arch>, -m32, or -m64
# w - Pass -no_weak_imports to the linker
#
# On 10.8 and newer, these flags will also be present:
# s - apply fix for sed's Unicode support

View File

@ -146,4 +146,8 @@ module Stdenv
append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
end
def permit_weak_imports
remove "LDFLAGS", "-Wl,-no_weak_imports"
end
end

View File

@ -107,6 +107,10 @@ module Superenv
ENV.x11 = MacOS::X11.installed?
end
def permit_weak_imports
remove "HOMEBREW_CCCFG", "w"
end
# These methods are no longer necessary under superenv, but are needed to
# maintain an interface compatible with stdenv.
alias_method :macosxsdk, :noop