Merge pull request #4941 from fxcoudert/mojave

super/cc: further bump -mmacosx-version-min on Mojave
This commit is contained in:
FX Coudert 2018-09-20 12:20:50 +02:00 committed by GitHub
commit 2901c36798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,8 @@ def mac?
RUBY_PLATFORM[/darwin/]
end
def mojave_or_later?
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 18
def high_sierra_or_later?
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 17
end
def linux?
@ -187,7 +187,7 @@ class Cmd
# clang doesn't support these flags
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
arg = "-mmacosx-version-min=10.9" if high_sierra_or_later? && $1.to_i < 9
args << arg
when "--fast-math"
arg = "-ffast-math" if tool =~ /^clang/