Skip to content

Commit 7314aaa

Browse files
committed
CI: split arguments of rustflags
1 parent 4953988 commit 7314aaa

File tree

7 files changed

+24
-4
lines changed

7 files changed

+24
-4
lines changed

.cargo/config.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
rustflags = []
33

44
[target.aarch64-apple-darwin]
5-
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]
5+
rustflags = [
6+
"-C",
7+
"link-args=-Wl,-undefined",
8+
"-C",
9+
"link-args=-Wl,dynamic_lookup",
10+
]

.github/workflows/build-macos-13.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
os: macos-13
1717
cache-prefix: macos-13-
1818
build-wasm: true
19+
rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup"

.github/workflows/build-macos-14.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
os: macos-14
1717
cache-prefix: macos-14-
1818
build-wasm: true
19+
rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup"

.github/workflows/build-macos-15.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
os: macos-15
1717
cache-prefix: macos-15-
1818
build-wasm: true
19+
rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup"

.github/workflows/build-macos-latest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
os: macos-latest
1717
cache-prefix: macos-latest-
1818
build-wasm: true
19+
rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup"

.github/workflows/build-reusable.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,25 @@ on:
2222
type: boolean
2323
default: false
2424
description: "Whether to build WASM targets"
25+
rustflags:
26+
required: false
27+
type: string
28+
default: ""
29+
description: "Additional RUSTFLAGS to append (e.g., macOS-specific linker flags)"
2530

2631
env:
2732
CARGO_TERM_COLOR: always
2833
RUST_BACKTRACE: full
2934
MINA_PANIC_ON_BUG: true
3035
CARGO_INCREMENTAL: 1
31-
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off -C link-args=-Wl,-undefined,dynamic_lookup"
36+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off"
3237

3338
jobs:
3439
build:
3540
timeout-minutes: 60
3641
runs-on: ${{ inputs.os }}
42+
env:
43+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}"
3744
steps:
3845
- name: Git checkout
3946
uses: actions/checkout@v5
@@ -75,6 +82,8 @@ jobs:
7582
build-tests:
7683
timeout-minutes: 60
7784
runs-on: ${{ inputs.os }}
85+
env:
86+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}"
7887
steps:
7988
- name: Git checkout
8089
uses: actions/checkout@v5
@@ -99,6 +108,8 @@ jobs:
99108
build-tests-webrtc:
100109
timeout-minutes: 60
101110
runs-on: ${{ inputs.os }}
111+
env:
112+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}"
102113
steps:
103114
- name: Git checkout
104115
uses: actions/checkout@v5
@@ -144,4 +155,4 @@ jobs:
144155
- name: Release build
145156
run: make build-wasm
146157
env:
147-
RUSTFLAGS: ""
158+
RUSTFLAGS: ""

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
RUST_BACKTRACE: full
1717
MINA_PANIC_ON_BUG: true
1818
CARGO_INCREMENTAL: 1
19-
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off -C link-args=-Wl,-undefined,dynamic_lookup"
19+
RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off"
2020

2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

0 commit comments

Comments
 (0)