super/cc: bump -mmacosx-version-min on High Sierra and later
This commit is contained in:
parent
1ff42f9058
commit
481ffcf4e1
@ -17,8 +17,8 @@ def mac?
|
|||||||
RUBY_PLATFORM[/darwin/]
|
RUBY_PLATFORM[/darwin/]
|
||||||
end
|
end
|
||||||
|
|
||||||
def mojave_or_later?
|
def high_sierra_or_later?
|
||||||
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 18
|
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 17
|
||||||
end
|
end
|
||||||
|
|
||||||
def linux?
|
def linux?
|
||||||
@ -187,7 +187,7 @@ class Cmd
|
|||||||
# 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)/
|
when /-mmacosx-version-min=10\.(\d)/
|
||||||
arg = "-mmacosx-version-min=10.6" if mojave_or_later? && $1.to_i < 6
|
arg = "-mmacosx-version-min=10.9" if high_sierra_or_later? && $1.to_i < 9
|
||||||
args << arg
|
args << arg
|
||||||
when "--fast-math"
|
when "--fast-math"
|
||||||
arg = "-ffast-math" if tool =~ /^clang/
|
arg = "-ffast-math" if tool =~ /^clang/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user