Skip to content

Commit 08ec7de

Browse files
committed
Target-dependent config like Barbell, no special treatment for MacOS arm64 in CI
1 parent 3fe9ac3 commit 08ec7de

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

.cargo/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
[target.'cfg(target_arch="x86_64")']
2+
rustflags = ["-C", "target-cpu=x86-64-v3"]
3+
4+
[target.'cfg(target_arch="aarch64")']
5+
rustflags = ["-C", "target-cpu=generic"]
6+
17
[build]
8+
# Fallback
29
rustflags = ["-C", "target-cpu=native"]

.github/workflows/test.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,5 @@ jobs:
2626
~/.cargo/git
2727
target
2828
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
29-
- name: Override target-cpu on macOS
30-
if: runner.os == 'macOS'
31-
run: |
32-
mkdir -p .cargo
33-
cat > .cargo/config.toml << 'EOF'
34-
[build]
35-
rustflags = ["-C", "target-cpu=apple-m1"]
36-
EOF
3729
- name: Run tests
3830
run: cargo test --verbose

0 commit comments

Comments
 (0)