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