superenv: add LDFLAGS if disabling weak imports.
This commit is contained in:
parent
53d1000739
commit
5609183567
@ -81,6 +81,10 @@ module Superenv
|
|||||||
s << "s" if MacOS.version >= :mountain_lion
|
s << "s" if MacOS.version >= :mountain_lion
|
||||||
# Fix issue with >= 10.8 apr-1-config having broken paths
|
# Fix issue with >= 10.8 apr-1-config having broken paths
|
||||||
s << "a" if MacOS.version >= :mountain_lion
|
s << "a" if MacOS.version >= :mountain_lion
|
||||||
|
# Xcode 8 should be told to fail to link against weak links
|
||||||
|
# Issue from Apple engineer:
|
||||||
|
# https://github.com/Homebrew/homebrew-core/issues/3727
|
||||||
|
s << "w" if no_weak_imports?
|
||||||
s
|
s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -258,8 +258,10 @@ class Cmd
|
|||||||
case mode
|
case mode
|
||||||
when :ld
|
when :ld
|
||||||
args << "-headerpad_max_install_names"
|
args << "-headerpad_max_install_names"
|
||||||
|
args << "-no_weak_imports" if no_weak_imports?
|
||||||
when :ccld, :cxxld
|
when :ccld, :cxxld
|
||||||
args << "-Wl,-headerpad_max_install_names"
|
args << "-Wl,-headerpad_max_install_names"
|
||||||
|
args << "-Wl,-no_weak_imports" if no_weak_imports?
|
||||||
end
|
end
|
||||||
args
|
args
|
||||||
end
|
end
|
||||||
@ -305,6 +307,10 @@ class Cmd
|
|||||||
config.include?("K")
|
config.include?("K")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def no_weak_imports?
|
||||||
|
config.include?("w")
|
||||||
|
end
|
||||||
|
|
||||||
def canonical_path(path)
|
def canonical_path(path)
|
||||||
path = Pathname.new(path)
|
path = Pathname.new(path)
|
||||||
path = path.realpath if path.exist?
|
path = path.realpath if path.exist?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user