Skip to content

Commit 9aaa82d

Browse files
authored
Feature/build riscv64 bin (#19819)
1 parent 3288ac2 commit 9aaa82d

File tree

9 files changed

+18
-9
lines changed

9 files changed

+18
-9
lines changed

.github/workflows/build-binaries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ jobs:
292292
maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16
293293
- target: arm-unknown-linux-musleabihf
294294
arch: arm
295+
- target: riscv64gc-unknown-linux-gnu
296+
arch: riscv64
295297

296298
steps:
297299
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -319,7 +321,7 @@ jobs:
319321
githubToken: ${{ github.token }}
320322
install: |
321323
apt-get update
322-
apt-get install -y --no-install-recommends python3 python3-pip
324+
apt-get install -y --no-install-recommends python3 python3-pip libatomic1
323325
pip3 install -U pip
324326
run: |
325327
pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall

crates/ruff/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dist = true
8585
[target.'cfg(target_os = "windows")'.dependencies]
8686
mimalloc = { workspace = true }
8787

88-
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies]
88+
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies]
8989
tikv-jemallocator = { workspace = true }
9090

9191
[lints]

crates/ruff/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
1919
any(
2020
target_arch = "x86_64",
2121
target_arch = "aarch64",
22-
target_arch = "powerpc64"
22+
target_arch = "powerpc64",
23+
target_arch = "riscv64"
2324
)
2425
))]
2526
#[global_allocator]

crates/ruff_benchmark/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ walltime = ["ruff_db/os", "ty_project", "divan"]
8686
[target.'cfg(target_os = "windows")'.dev-dependencies]
8787
mimalloc = { workspace = true }
8888

89-
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dev-dependencies]
89+
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dev-dependencies]
9090
tikv-jemallocator = { workspace = true }

crates/ruff_benchmark/benches/formatter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2121
any(
2222
target_arch = "x86_64",
2323
target_arch = "aarch64",
24-
target_arch = "powerpc64"
24+
target_arch = "powerpc64",
25+
target_arch = "riscv64"
2526
)
2627
))]
2728
#[global_allocator]

crates/ruff_benchmark/benches/lexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
1818
any(
1919
target_arch = "x86_64",
2020
target_arch = "aarch64",
21-
target_arch = "powerpc64"
21+
target_arch = "powerpc64",
22+
target_arch = "riscv64"
2223
)
2324
))]
2425
#[global_allocator]

crates/ruff_benchmark/benches/linter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2626
any(
2727
target_arch = "x86_64",
2828
target_arch = "aarch64",
29-
target_arch = "powerpc64"
29+
target_arch = "powerpc64",
30+
target_arch = "riscv64"
3031
)
3132
))]
3233
#[global_allocator]
@@ -42,7 +43,8 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
4243
any(
4344
target_arch = "x86_64",
4445
target_arch = "aarch64",
45-
target_arch = "powerpc64"
46+
target_arch = "powerpc64",
47+
target_arch = "riscv64"
4648
)
4749
))]
4850
#[unsafe(export_name = "_rjem_malloc_conf")]

crates/ruff_benchmark/benches/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
2020
any(
2121
target_arch = "x86_64",
2222
target_arch = "aarch64",
23-
target_arch = "powerpc64"
23+
target_arch = "powerpc64",
24+
target_arch = "riscv64"
2425
)
2526
))]
2627
#[global_allocator]

dist-workspace.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ targets = [
2828
"x86_64-apple-darwin",
2929
"powerpc64-unknown-linux-gnu",
3030
"powerpc64le-unknown-linux-gnu",
31+
"riscv64gc-unknown-linux-gnu",
3132
"s390x-unknown-linux-gnu",
3233
"x86_64-unknown-linux-gnu",
3334
"x86_64-unknown-linux-musl",

0 commit comments

Comments
 (0)