Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permit_weak_imports directive #741

Merged
merged 2 commits into from
Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Library/Homebrew/extend/ENV/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def warn_about_non_apple_gcc(name)

def permit_arch_flags; end

def permit_weak_imports; end

private

def cc=(val)
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/extend/ENV/super.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def setup_build_environment(formula = nil)
# 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
Expand Down
4 changes: 4 additions & 0 deletions Library/Homebrew/extend/os/mac/extend/ENV/std.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,8 @@ def x11

append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
end

def permit_weak_imports
remove "LDFLAGS", "-Wl,-no_weak_imports"
end
end
4 changes: 4 additions & 0 deletions Library/Homebrew/extend/os/mac/extend/ENV/super.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def set_x11_env_if_installed
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
Expand Down