| ... | ... | @@ -8,13 +8,13 @@ ARCH="$(uname -m)" |
| 8 | 8 | DEPS_LOCAL="$HOME/local" |
| 9 | 9 | OLD_ZIG="$DEPS_LOCAL/bin/zig" |
| 10 | 10 | TARGET="${ARCH}-linux-musl" |
| 11 | | MCPU="baseline" |
| 12 | 11 | |
| 13 | 12 | mkdir -p "$DEPS_LOCAL" |
| 14 | 13 | cd "$DEPS_LOCAL" |
| 15 | 14 | |
| 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 |
| 18 | 18 | |
| 19 | 19 | wget https://ziglang.org/deps/qemu-linux-x86_64-6.1.0.1.tar.xz |
| 20 | 20 | 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 |
| 29 | 29 | cd "$ZIGDIR" |
| 30 | 30 | echo "building stage3-debug with zig version $($OLD_ZIG version)" |
| 31 | 31 | |
| 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" |
| 50 | 40 | |
| 51 | 41 | echo "Looking for non-conforming code formatting..." |
| 52 | | stage3/bin/zig fmt --check .. \ |
| 42 | zig-out/bin/zig fmt --check .. \ |
| 53 | 43 | --exclude ../test/cases/ \ |
| 54 | 44 | --exclude ../build |
| 55 | 45 | |
| 56 | 46 | # 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 |
| 58 | 48 | |
| 59 | | stage3/bin/zig build test \ |
| 49 | zig-out/bin/zig build test docs \ |
| 60 | 50 | -fqemu \ |
| 61 | 51 | -fwasmtime \ |
| 62 | 52 | -Dstatic-llvm \ |