Skip to content

Commit d1287d1

Browse files
bitskcmaglie
authored andcommitted
Add riscv64 linux tools download support
1 parent 9e5deed commit d1287d1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: internal/arduino/cores/tools.go

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func (tr *ToolRelease) RuntimeProperties() *properties.Map {
129129
var (
130130
regexpLinuxArm = regexp.MustCompile("arm.*-linux-gnueabihf")
131131
regexpLinuxArm64 = regexp.MustCompile("(aarch64|arm64)-linux-gnu")
132+
regexpLinuxRiscv64 = regexp.MustCompile("riscv64-linux-gnu")
132133
regexpLinux64 = regexp.MustCompile("x86_64-.*linux-gnu")
133134
regexpLinux32 = regexp.MustCompile("i[3456]86-.*linux-gnu")
134135
regexpWindows32 = regexp.MustCompile("i[3456]86-.*(mingw32|cygwin)")
@@ -151,6 +152,8 @@ func (f *Flavor) isExactMatchWith(osName, osArch string) bool {
151152
return regexpLinuxArm.MatchString(f.OS)
152153
case "linux,arm64":
153154
return regexpLinuxArm64.MatchString(f.OS)
155+
case "linux,riscv64":
156+
return regexpLinuxRiscv64.MatchString(f.OS)
154157
case "linux,amd64":
155158
return regexpLinux64.MatchString(f.OS)
156159
case "linux,386":

Diff for: internal/arduino/cores/tools_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func TestFlavorCompatibility(t *testing.T) {
3434
linuxArm := &os{"linux", "arm"}
3535
linuxArmbe := &os{"linux", "armbe"}
3636
linuxArm64 := &os{"linux", "arm64"}
37+
linuxRiscv64 := &os{"linux", "riscv64"}
3738
darwin32 := &os{"darwin", "386"}
3839
darwin64 := &os{"darwin", "amd64"}
3940
darwinArm64 := &os{"darwin", "arm64"}
@@ -47,6 +48,7 @@ func TestFlavorCompatibility(t *testing.T) {
4748
linuxArm,
4849
linuxArmbe,
4950
linuxArm64,
51+
linuxRiscv64,
5052
darwin32,
5153
darwin64,
5254
darwinArm64,
@@ -82,6 +84,7 @@ func TestFlavorCompatibility(t *testing.T) {
8284
{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linux64}, []*os{linux64}},
8385
{&Flavor{OS: "aarch64-linux-gnu"}, []*os{linuxArm64}, []*os{linuxArm64}},
8486
{&Flavor{OS: "arm64-linux-gnu"}, []*os{linuxArm64}, []*os{linuxArm64}},
87+
{&Flavor{OS: "riscv64-linux-gnu"}, []*os{linuxRiscv64}, []*os{linuxRiscv64}},
8588
}
8689

8790
checkCompatible := func(test *test, os *os) {

0 commit comments

Comments
 (0)