Merge pull request #741 from tdsmith/weak-imports-opt-in
Add permit_weak_imports directive
This commit is contained in:
commit
893c80d3ba
@ -293,6 +293,8 @@ module SharedEnvExtension
|
|||||||
|
|
||||||
def permit_arch_flags; end
|
def permit_arch_flags; end
|
||||||
|
|
||||||
|
def permit_weak_imports; end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def cc=(val)
|
def cc=(val)
|
||||||
|
|||||||
@ -78,6 +78,7 @@ module Superenv
|
|||||||
# g - Enable "-stdlib=libc++" for clang.
|
# g - Enable "-stdlib=libc++" for clang.
|
||||||
# h - Enable "-stdlib=libstdc++" for clang.
|
# h - Enable "-stdlib=libstdc++" for clang.
|
||||||
# K - Don't strip -arch <arch>, -m32, or -m64
|
# 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:
|
# On 10.8 and newer, these flags will also be present:
|
||||||
# s - apply fix for sed's Unicode support
|
# s - apply fix for sed's Unicode support
|
||||||
|
|||||||
@ -146,4 +146,8 @@ module Stdenv
|
|||||||
|
|
||||||
append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
|
append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def permit_weak_imports
|
||||||
|
remove "LDFLAGS", "-Wl,-no_weak_imports"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -107,6 +107,10 @@ module Superenv
|
|||||||
ENV.x11 = MacOS::X11.installed?
|
ENV.x11 = MacOS::X11.installed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def permit_weak_imports
|
||||||
|
remove "HOMEBREW_CCCFG", "w"
|
||||||
|
end
|
||||||
|
|
||||||
# These methods are no longer necessary under superenv, but are needed to
|
# These methods are no longer necessary under superenv, but are needed to
|
||||||
# maintain an interface compatible with stdenv.
|
# maintain an interface compatible with stdenv.
|
||||||
alias_method :macosxsdk, :noop
|
alias_method :macosxsdk, :noop
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user