| ... | @@ -20,8 +20,8 @@ git config core.abbrev 9 | ... | @@ -20,8 +20,8 @@ git config core.abbrev 9 |
| 20 | git fetch --unshallow || true | 20 | git fetch --unshallow || true |
| 21 | git fetch --tags | 21 | git fetch --tags |
| 22 | | 22 | |
| 23 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" | 23 | #export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" |
| 24 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" | 24 | #export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" |
| 25 | | 25 | |
| 26 | rm -rf build-release | 26 | rm -rf build-release |
| 27 | mkdir build-release | 27 | mkdir build-release |
| ... | @@ -33,66 +33,66 @@ cd build-release | ... | @@ -33,66 +33,66 @@ cd build-release |
| 33 | export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache" | 33 | export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache" |
| 34 | export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache" | 34 | export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache" |
| 35 | | 35 | |
| 36 | cmake .. \ | 36 | #cmake .. \ |
| 37 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ | 37 | # -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 38 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 38 | # -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 39 | -DCMAKE_BUILD_TYPE=Release \ | 39 | # -DCMAKE_BUILD_TYPE=Release \ |
| 40 | -DZIG_TARGET_TRIPLE="$TARGET" \ | 40 | # -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 41 | -DZIG_TARGET_MCPU="$MCPU" \ | 41 | # -DZIG_TARGET_MCPU="$MCPU" \ |
| 42 | -DZIG_STATIC=ON \ | 42 | # -DZIG_STATIC=ON \ |
| 43 | -DZIG_NO_LIB=ON \ | 43 | # -DZIG_NO_LIB=ON \ |
| 44 | -GNinja | 44 | # -GNinja |
| 45 | | 45 | # |
| 46 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | 46 | ## Now cmake will use zig as the C/C++ compiler. We reset the environment variables |
| 47 | # so that installation and testing do not get affected by them. | 47 | ## so that installation and testing do not get affected by them. |
| 48 | unset CC | 48 | #unset CC |
| 49 | unset CXX | 49 | #unset CXX |
| 50 | | 50 | # |
| 51 | ninja install | 51 | #ninja install |
| 52 | | 52 | # |
| 53 | # TODO: move this to a build.zig step (check-fmt) | 53 | ## TODO: move this to a build.zig step (check-fmt) |
| 54 | echo "Looking for non-conforming code formatting..." | 54 | #echo "Looking for non-conforming code formatting..." |
| 55 | stage3-release/bin/zig fmt --check .. \ | 55 | #stage3-release/bin/zig fmt --check .. \ |
| 56 | --exclude ../test/cases/ \ | 56 | # --exclude ../test/cases/ \ |
| 57 | --exclude ../build-debug \ | 57 | # --exclude ../build-debug \ |
| 58 | --exclude ../build-release | 58 | # --exclude ../build-release |
| 59 | | 59 | # |
| 60 | # simultaneously test building self-hosted without LLVM and with 32-bit arm | 60 | ## simultaneously test building self-hosted without LLVM and with 32-bit arm |
| 61 | stage3-release/bin/zig build \ | 61 | #stage3-release/bin/zig build \ |
| 62 | -Dtarget=arm-linux-musleabihf \ | 62 | # -Dtarget=arm-linux-musleabihf \ |
| 63 | -Dno-lib | 63 | # -Dno-lib |
| 64 | | 64 | # |
| 65 | stage3-release/bin/zig build test docs \ | 65 | #stage3-release/bin/zig build test docs \ |
| 66 | --maxrss 21000000000 \ | 66 | # --maxrss 21000000000 \ |
| 67 | -fqemu \ | 67 | # -fqemu \ |
| 68 | -fwasmtime \ | 68 | # -fwasmtime \ |
| 69 | -Dstatic-llvm \ | 69 | # -Dstatic-llvm \ |
| 70 | -Dtarget=native-native-musl \ | 70 | # -Dtarget=native-native-musl \ |
| 71 | --search-prefix "$PREFIX" \ | 71 | # --search-prefix "$PREFIX" \ |
| 72 | --zig-lib-dir "$(pwd)/../lib" | 72 | # --zig-lib-dir "$(pwd)/../lib" |
| 73 | | 73 | # |
| 74 | # Look for HTML errors. | 74 | ## Look for HTML errors. |
| 75 | # TODO: move this to a build.zig flag (-Denable-tidy) | 75 | ## TODO: move this to a build.zig flag (-Denable-tidy) |
| 76 | tidy --drop-empty-elements no -qe "../zig-out/doc/langref.html" | 76 | #tidy --drop-empty-elements no -qe "../zig-out/doc/langref.html" |
| 77 | | 77 | # |
| 78 | # Ensure that stage3 and stage4 are byte-for-byte identical. | 78 | ## Ensure that stage3 and stage4 are byte-for-byte identical. |
| 79 | stage3-release/bin/zig build \ | 79 | #stage3-release/bin/zig build \ |
| 80 | --prefix stage4-release \ | 80 | # --prefix stage4-release \ |
| 81 | -Denable-llvm \ | 81 | # -Denable-llvm \ |
| 82 | -Dno-lib \ | 82 | # -Dno-lib \ |
| 83 | -Doptimize=ReleaseFast \ | 83 | # -Doptimize=ReleaseFast \ |
| 84 | -Dstrip \ | 84 | # -Dstrip \ |
| 85 | -Dtarget=$TARGET \ | 85 | # -Dtarget=$TARGET \ |
| 86 | -Duse-zig-libcxx \ | 86 | # -Duse-zig-libcxx \ |
| 87 | -Dversion-string="$(stage3-release/bin/zig version)" | 87 | # -Dversion-string="$(stage3-release/bin/zig version)" |
| 88 | | 88 | # |
| 89 | # diff returns an error code if the files differ. | 89 | ## diff returns an error code if the files differ. |
| 90 | echo "If the following command fails, it means nondeterminism has been" | 90 | #echo "If the following command fails, it means nondeterminism has been" |
| 91 | echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." | 91 | #echo "introduced, making stage3 and stage4 no longer byte-for-byte identical." |
| 92 | diff stage3-release/bin/zig stage4-release/bin/zig | 92 | #diff stage3-release/bin/zig stage4-release/bin/zig |
| 93 | | 93 | # |
| 94 | # Ensure that updating the wasm binary from this commit will result in a viable build. | 94 | ## Ensure that updating the wasm binary from this commit will result in a viable build. |
| 95 | stage3-release/bin/zig build update-zig1 | 95 | #stage3-release/bin/zig build update-zig1 |
| 96 | | 96 | |
| 97 | rm -rf ../build-new | 97 | rm -rf ../build-new |
| 98 | mkdir ../build-new | 98 | mkdir ../build-new |