@@ -140,7 +140,7 @@ struct MacOS <: Platform
140140 libc:: Union{Nothing,Symbol} = nothing ,
141141 call_abi:: Union{Nothing,Symbol} = nothing ,
142142 compiler_abi:: CompilerABI = CompilerABI ())
143- if arch != = :x86_64
143+ if arch != = :x86_64 && arch != = :aarch64
144144 throw (ArgumentError (" Unsupported architecture '$arch ' for macOS" ))
145145 end
146146 if libc != = nothing
@@ -404,7 +404,7 @@ function platform_key_abi(machine::AbstractString)
404404 arch_mapping = Dict (
405405 :x86_64 => " (x86_|amd)64" ,
406406 :i686 => " i\\ d86" ,
407- :aarch64 => " aarch64 " ,
407+ :aarch64 => " (aarch|arm)64 " ,
408408 :armv7l => " arm(v7l)?" , # if we just see `arm-linux-gnueabihf`, we assume it's `armv7l`
409409 :armv6l => " armv6l" ,
410410 :powerpc64le => " p(ower)?pc64le" ,
@@ -458,6 +458,7 @@ function platform_key_abi(machine::AbstractString)
458458 ))
459459
460460 m = match (triplet_regex, machine)
461+ msg = " "
461462 if m != = nothing
462463 # Helper function to find the single named field within the giant regex
463464 # that is not `nothing` for each mapping we give it.
@@ -502,11 +503,14 @@ function platform_key_abi(machine::AbstractString)
502503 cxxstring_abi= cxxstring_abi
503504 )
504505 return T (arch, libc= libc, call_abi= call_abi, compiler_abi= compiler_abi)
505- catch
506+ catch err
507+ if isa (err, ArgumentError)
508+ msg = " ($(err. msg) )"
509+ end
506510 end
507511 end
508512
509- @warn (" Platform `$(machine) ` is not an officially supported platform" )
513+ @warn (" Platform `$(machine) ` is not an officially supported platform$msg " )
510514 return UnknownPlatform ()
511515end
512516
0 commit comments