Skip to content

Commit a279cf8

Browse files
committed
ci: add missing target/mcpu args to zig cc
In the previous commit, I forgot to add these.
1 parent ce5222d commit a279cf8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ci/azure/linux_script

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ sudo apt-get install -y cmake s3cmd ninja-build tidy
88

99
ZIGDIR="$(pwd)"
1010
ARCH="$(uname -m)"
11-
CACHE_BASENAME="zig+llvm+lld+clang-$ARCH-linux-musl-0.8.0-dev.859+f1ef0a80f"
11+
TARGET="$ARCH-linux-musl"
12+
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.8.0-dev.859+f1ef0a80f"
1213
PREFIX="$HOME/$CACHE_BASENAME"
14+
MCPU="baseline"
1315

1416
rm -rf $PREFIX
1517
cd $HOME
@@ -28,8 +30,8 @@ tar xf "$WASMTIME.tar.xz"
2830
export PATH="$(pwd)/$WASMTIME:$PATH"
2931

3032
ZIG="$PREFIX/bin/zig"
31-
export CC="$ZIG cc"
32-
export CXX="$ZIG c++"
33+
export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
34+
export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
3335

3436
cd $ZIGDIR
3537

@@ -45,8 +47,8 @@ cmake .. \
4547
-DCMAKE_INSTALL_PREFIX="$(pwd)/release" \
4648
-DCMAKE_PREFIX_PATH="$PREFIX" \
4749
-DCMAKE_BUILD_TYPE=Release \
48-
-DZIG_TARGET_TRIPLE="$ARCH-linux-musl" \
49-
-DZIG_TARGET_MCPU="baseline" \
50+
-DZIG_TARGET_TRIPLE="$TARGET" \
51+
-DZIG_TARGET_MCPU="$MCPU" \
5052
-DZIG_STATIC=ON \
5153
-GNinja
5254

0 commit comments

Comments
 (0)