Commit b3d7a25 1 parent 35b3f35 commit b3d7a25 Copy full SHA for b3d7a25
File tree 2 files changed +6
-14
lines changed
packages/turbo-repository/scripts
2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -114,21 +114,7 @@ jobs:
114
114
run : ${{ matrix.settings.setup }}
115
115
if : ${{ matrix.settings.setup }}
116
116
117
- # For x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu, we need to cross-compile with zig
118
- # Fortunately, napi comes with a `--zig` flag
119
- - name : Build native library (cross-compile with zig)
120
- if : ${{ matrix.settings.target == 'x86_64-unknown-linux-gnu' || matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
121
- # For some reason PATH modifications from Setup toolchain aren't populated
122
- # when using the nodejs-rust alpine container.
123
- run : |
124
- export PATH=/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
125
- cd packages/turbo-repository
126
- ${{ matrix.settings.rust_env }} pnpm build:release --target=${{ matrix.settings.target }} --zig
127
-
128
117
- name : Build native library
129
- if : ${{ matrix.settings.target != 'x86_64-unknown-linux-gnu' && matrix.settings.target != 'aarch64-unknown-linux-gnu' }}
130
- # For some reason PATH modifications from Setup toolchain aren't populated
131
- # when using the nodejs-rust alpine container.
132
118
run : |
133
119
export PATH=/usr/local/cargo/bin/rustup:/root/.cargo/bin:${PATH}
134
120
cd packages/turbo-repository
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ for flag in $user_provided_flags; do
14
14
if [[ $flag == --target= * ]]; then
15
15
target=${flag#* =}
16
16
rustup target add " $target "
17
+
18
+ # For we need to cross-compile some targets with Zig
19
+ # Fortunately, napi comes with a `--zig` flag
20
+ if [[ $target == x86_64-unknown-linux-gnu || $target == aarch64-unknown-linux-gnu ]]; then
21
+ script_provided_flags+=" --zig"
22
+ fi
17
23
fi
18
24
done
19
25
You can’t perform that action at this time.
0 commit comments