@@ -296,6 +296,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
296
296
end
297
297
298
298
function macos_version (kernel_version:: Integer )
299
+ # See https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
299
300
kernel_to_macos = Dict (
300
301
12 => " 10.8" ,
301
302
13 => " 10.9" ,
@@ -306,6 +307,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
306
307
18 => " 10.14" ,
307
308
19 => " 10.15" ,
308
309
20 => " 11.0" ,
310
+ 21 => " 12.0" ,
309
311
)
310
312
return get (kernel_to_macos, kernel_version, nothing )
311
313
end
@@ -320,7 +322,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
320
322
321
323
# Eventually, we'll take this in `os_version(p)`, but not just yet. We need to fix the paths
322
324
# to the compiler shards first, since right now they have `14` at the end
323
- version = v " 14.0.0"
325
+ version = something ( os_version (p), v " 14.0.0" )
324
326
return macos_version (version. major)
325
327
end
326
328
@@ -391,8 +393,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
391
393
end
392
394
393
395
# Simulate some of the `__OSX_AVAILABLE()` macro usage that is broken in GCC
394
- # Currently, we only target 10.10, but eventually, we'll want to tailor this to `os_version(p)`
395
- if Sys. isapple (p) && 14 < 16
396
+ if Sys. isapple (p) && something (os_version (p), v " 14" ) < v " 16"
396
397
# Disable usage of `clock_gettime()`
397
398
push! (flags, " -D_DARWIN_FEATURE_CLOCK_GETTIME=0" )
398
399
end
0 commit comments