Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Allow disabling arch flag filtering
Browse files Browse the repository at this point in the history
Closes #17352.
  • Loading branch information
jacknagel committed May 14, 2014
1 parent 2ed3a93 commit 83ceef1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Library/ENV/4.3/cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,15 @@ class Cmd
loop do
case arg = enum.next
when "-arch"
enum.next
if cccfg?("K")
args << arg << enum.next
else
enum.next
end
when "-m32"
args << arg if cccfg?("3")
args << arg if cccfg?("3") || cccfg?("K")
when "-m64"
args << arg if cccfg?("K")
when /^-Xarch_/
refurbished = refurbish_arg(enum.next, enum)
unless refurbished.empty?
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/extend/ENV/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,6 @@ def warn_about_non_apple_gcc(gcc)
EOS
end
end

def permit_arch_flags; end
end
5 changes: 5 additions & 0 deletions Library/Homebrew/extend/ENV/super.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def setup_build_environment(formula=nil)
# x - Enable C++11 mode.
# g - Enable "-stdlib=libc++" for clang.
# h - Enable "-stdlib=libstdc++" for clang.
# K - Don't strip -arch <arch>, -m32, or -m64
#
# On 10.8 and newer, these flags will also be present:
# s - apply fix for sed's Unicode support
Expand Down Expand Up @@ -266,6 +267,10 @@ def universal_binary
end
end

def permit_arch_flags
append "HOMEBREW_CCCFG", "K"
end

def cxx11
case self["HOMEBREW_CC"]
when "clang"
Expand Down

0 comments on commit 83ceef1

Please sign in to comment.