File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,11 @@ jobs:
177177 echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
178178 echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
179179 echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
180- if [[ "${{ runner.os }}" == "Linux" ]]; then
180+ # Only use mold for native Linux builds, not cross-compilation
181+ if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
181182 echo "RUSTFLAGS=-C codegen-units=16 -C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
183+ elif [[ "${{ runner.os }}" == "Linux" ]]; then
184+ echo "RUSTFLAGS=-C codegen-units=16" >> $GITHUB_ENV
182185 elif [[ "${{ runner.os }}" == "macOS" ]]; then
183186 echo "RUSTFLAGS=-C codegen-units=16" >> $GITHUB_ENV
184187 echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -163,8 +163,11 @@ jobs:
163163 echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
164164 echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
165165 echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV
166- if [[ "${{ runner.os }}" == "Linux" ]]; then
166+ # Only use mold for native Linux builds, not cross-compilation
167+ if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
167168 echo "RUSTFLAGS=-C codegen-units=16 -C link-arg=-fuse-ld=mold" >> $GITHUB_ENV
169+ elif [[ "${{ runner.os }}" == "Linux" ]]; then
170+ echo "RUSTFLAGS=-C codegen-units=16" >> $GITHUB_ENV
168171 elif [[ "${{ runner.os }}" == "macOS" ]]; then
169172 echo "RUSTFLAGS=-C codegen-units=16" >> $GITHUB_ENV
170173 echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments