Skip to content

Commit a116430

Browse files
authored
Release fixes (#426)
Release fixes
2 parents 88501e0 + ba82395 commit a116430

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,6 @@ jobs:
326326
name: Add additional targets
327327
command: |
328328
rustup target add x86_64-pc-windows-gnu x86_64-apple-darwin
329-
# A hack to force skipping the linking step (which will fail due to the missing macOS SDK).
330-
# We re-use the dylib generated in the "macOS release build" step.
331-
mkdir -p .cargo
332-
echo '[target.x86_64-apple-darwin]' >> .cargo/config
333-
echo 'linker = "true"' >> .cargo/config
334329
- run:
335330
name: Fix broken mingw toolchain
336331
command: |
@@ -352,6 +347,11 @@ jobs:
352347
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc"
353348
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_PC_WINDOWS_GNU_AR=x86_64-w64-mingw32-ar
354349
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_PC_WINDOWS_GNU_CC=x86_64-w64-mingw32-gcc
350+
# A hack to force-skip macOS builds.
351+
# We re-use the dylib generated in the "macOS release build" step.
352+
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_AR=true
353+
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CC=true
354+
export RUSTC=$(pwd)/bin/rust-wrapper-hack.sh
355355
356356
echo "rust.targets=arm,arm64,x86_64,x86,linux-x86-64,win32-x86-64-gnu,darwin" > local.properties
357357

bin/rust-wrapper-hack.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# A hack to not do anything when targetting darwin (macOS),
4+
# but still correctly build everything else.
5+
# Only to be used on Linux hosts.
6+
7+
unset RUSTC
8+
if echo "$*" | grep -q "print=cfg"; then
9+
rustc $*
10+
elif echo "$*" | grep -q "target x86_64-apple-darwin"; then
11+
true
12+
else
13+
rustc $*
14+
fi

0 commit comments

Comments
 (0)