diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index 8c6fa2a5f4a03..c8a55c99a5724 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -194,7 +194,7 @@ end function validate_tags(tags::Dict) throw_invalid_key(k) = throw(ArgumentError("Key \"$(k)\" cannot have value \"$(tags[k])\"")) # Validate `arch` - if tags["arch"] ∉ ("x86_64", "i686", "armv7l", "armv6l", "aarch64", "powerpc64le") + if tags["arch"] ∉ ("x86_64", "i686", "armv7l", "armv6l", "aarch64", "powerpc64le", "riscv64") throw_invalid_key("arch") end # Validate `os` @@ -597,6 +597,7 @@ const arch_mapping = Dict( "armv7l" => "arm(v7l)?", # if we just see `arm-linux-gnueabihf`, we assume it's `armv7l` "armv6l" => "armv6l", "powerpc64le" => "p(ower)?pc64le", + "riscv64" => "riscv64", ) # Keep this in sync with `CPUID.ISAs_by_family` # These are the CPUID side of the microarchitectures targeted by GCC flags in BinaryBuilder.jl @@ -632,7 +633,10 @@ const arch_march_isa_mapping = let ], "powerpc64le" => [ "power8" => get_set("powerpc64le", "power8"), - ] + ], + "riscv64" => [ + "riscv64" => get_set("riscv64", "riscv64"), + ], ) end const os_mapping = Dict( diff --git a/base/cpuid.jl b/base/cpuid.jl index 48930d8064ba9..876ea600ab0b0 100644 --- a/base/cpuid.jl +++ b/base/cpuid.jl @@ -64,7 +64,11 @@ const ISAs_by_family = Dict( "powerpc64le" => [ # We have no way to test powerpc64le features yet, so we're only going to declare the lowest ISA: "power8" => ISA(Set{UInt32}()), - ] + ], + "riscv64" => [ + # We have no way to test riscv64 features yet, so we're only going to declare the lowest ISA: + "riscv64" => ISA(Set{UInt32}()), + ], ) # Test a CPU feature exists on the currently-running host