Merge pull request #4810 from MikeMcQuaid/mojave-mmacosx-version-min
super/cc: fix -mmacosx-version-min on Mojave.
This commit is contained in:
commit
9777b2788e
@ -17,6 +17,10 @@ def mac?
|
|||||||
RUBY_PLATFORM[/darwin/]
|
RUBY_PLATFORM[/darwin/]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mojave_or_later?
|
||||||
|
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 18
|
||||||
|
end
|
||||||
|
|
||||||
def linux?
|
def linux?
|
||||||
RUBY_PLATFORM[/linux/]
|
RUBY_PLATFORM[/linux/]
|
||||||
end
|
end
|
||||||
@ -182,6 +186,9 @@ class Cmd
|
|||||||
"-fuse-linker-plugin", "-frounding-math"
|
"-fuse-linker-plugin", "-frounding-math"
|
||||||
# clang doesn't support these flags
|
# clang doesn't support these flags
|
||||||
args << arg unless tool =~ /^clang/
|
args << arg unless tool =~ /^clang/
|
||||||
|
when /-mmacosx-version-min=10\.(\d)/
|
||||||
|
arg = "-mmacosx-version-min=10.6" if mojave_or_later? && $1.to_i < 6
|
||||||
|
args << arg
|
||||||
when "--fast-math"
|
when "--fast-math"
|
||||||
arg = "-ffast-math" if tool =~ /^clang/
|
arg = "-ffast-math" if tool =~ /^clang/
|
||||||
args << arg
|
args << arg
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user