Skip to content

Commit 7162ce4

Browse files
juntaoclaude
andcommitted
Move aarch64 rustflags to .cargo/config.toml
- Add .cargo/config.toml with fp16 target feature for aarch64 - Remove RUSTFLAGS from CI workflows (now handled by cargo config) - Update README to reflect the change Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d6ebf49 commit 7162ce4

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
rustflags = ["-C", "target-feature=+fp16"]

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ jobs:
108108
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
109109
PKG_CONFIG_ALLOW_CROSS: "1"
110110
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
111-
RUSTFLAGS: "-C target-feature=+fp16"
112111
run: cargo build --release --target aarch64-unknown-linux-gnu
113112

114113
- name: Package release artifact

.github/workflows/rust_ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ jobs:
8484
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
8585
PKG_CONFIG_ALLOW_CROSS: "1"
8686
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
87-
RUSTFLAGS: "-C target-feature=+fp16"
8887
run: cargo build --release --target aarch64-unknown-linux-gnu

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Edit `config.toml` to customize the VAD, ASR, LLM, TTS services, as well as prom
5959
cargo build --release
6060
```
6161

62-
**Note for aarch64 (ARM64) builds:** If building on or for aarch64 Linux, you may need to enable the fp16 target feature:
62+
**Note for aarch64 (ARM64) builds:** When cross-compiling for aarch64, the required `fp16` target feature is automatically enabled via `.cargo/config.toml`. If building natively on aarch64, you may need to set:
6363

6464
```
6565
RUSTFLAGS="-C target-feature=+fp16" cargo build --release

0 commit comments

Comments
 (0)