Skip to content

Commit 5f23b65

Browse files
committed
CI: build from old zig on x86_64-linux debug
This is to work around OOM on the CI server. Once #13560 is complete, we can avoid having to replace the tarballs so often.
1 parent 8bbb4a2 commit 5f23b65

File tree

4 files changed

+17
-29
lines changed

4 files changed

+17
-29
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,6 @@ set(BUILD_ZIG2_ARGS
10381038
-lc
10391039
--pkg-begin build_options "${ZIG_CONFIG_ZIG_OUT}"
10401040
--pkg-end
1041-
--pkg-begin compiler_rt "${CMAKE_SOURCE_DIR}/lib/compiler_rt.zig"
1042-
--pkg-end
10431041
)
10441042

10451043
if("${ZIG_EXECUTABLE}" STREQUAL "")

ci/linux/build-x86_64-debug.sh

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ ARCH="$(uname -m)"
88
DEPS_LOCAL="$HOME/local"
99
OLD_ZIG="$DEPS_LOCAL/bin/zig"
1010
TARGET="${ARCH}-linux-musl"
11-
MCPU="baseline"
1211

1312
mkdir -p "$DEPS_LOCAL"
1413
cd "$DEPS_LOCAL"
1514

16-
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz
17-
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz
15+
OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
16+
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
17+
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
1818

1919
wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
2020
tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz
@@ -29,34 +29,24 @@ export PATH=$DEPS_LOCAL/bin:$PATH
2929
cd "$ZIGDIR"
3030
echo "building stage3-debug with zig version $($OLD_ZIG version)"
3131

32-
export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU"
33-
export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU"
34-
35-
mkdir build
36-
cd build
37-
cmake .. \
38-
-DCMAKE_INSTALL_PREFIX="$(pwd)/stage3" \
39-
-DCMAKE_PREFIX_PATH="$DEPS_LOCAL" \
40-
-DCMAKE_BUILD_TYPE=Debug \
41-
-DZIG_STATIC=ON \
42-
-DZIG_USE_LLVM_CONFIG=OFF
43-
44-
# Now cmake will use zig as the C/C++ compiler. We reset the environment variables
45-
# so that installation and testing do not get affected by them.
46-
unset CC
47-
unset CXX
48-
49-
make -j2 install
32+
"$OLD_ZIG" build \
33+
--search-prefix "$DEPS_LOCAL" \
34+
--zig-lib-dir "$(pwd)/../lib" \
35+
-Denable-stage1 \
36+
-Dstatic-llvm \
37+
-Drelease \
38+
-Duse-zig-libcxx \
39+
-Dtarget="$TARGET"
5040

5141
echo "Looking for non-conforming code formatting..."
52-
stage3/bin/zig fmt --check .. \
42+
zig-out/bin/zig fmt --check .. \
5343
--exclude ../test/cases/ \
5444
--exclude ../build
5545

5646
# simultaneously test building self-hosted without LLVM and with 32-bit arm
57-
stage3/bin/zig build -Dtarget=arm-linux-musleabihf
47+
zig-out/bin/zig build -Dtarget=arm-linux-musleabihf
5848

59-
stage3/bin/zig build test \
49+
zig-out/bin/zig build test docs \
6050
-fqemu \
6151
-fwasmtime \
6252
-Dstatic-llvm \

ci/linux/build-x86_64-release.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ MCPU="baseline"
1313
mkdir -p "$DEPS_LOCAL"
1414
cd "$DEPS_LOCAL"
1515

16-
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz
17-
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-0.10.0-dev.4560+828735ac0.tar.xz
16+
OLD_ZIG_VERSION="0.11.0-dev.256+271cc52a1"
17+
wget https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
18+
tar x --strip-components=1 -f zig+llvm+lld+clang-x86_64-linux-musl-$OLD_ZIG_VERSION.tar.xz
1819

1920
wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz
2021
tar x --strip-components=1 -f qemu-linux-x86_64-6.1.0.1.tar.xz

ci/windows/build.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Write-Output "Building Zig..."
4040
-Denable-stage1 `
4141
-Dstatic-llvm `
4242
-Drelease `
43-
-Dstrip `
4443
-Duse-zig-libcxx `
4544
-Dtarget="$TARGET"
4645
CheckLastExitCode

0 commit comments

Comments
 (0)