| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | . ./ci/zinc/linux_base.sh |
| 4 | 4 | |
| 5 | | ZIG="$DEPS_LOCAL/bin/zig" |
| 5 | OLD_ZIG="$DEPS_LOCAL/bin/zig" |
| 6 | 6 | TARGET="${ARCH}-linux-musl" |
| 7 | 7 | MCPU="baseline" |
| 8 | 8 | |
| ... | ... | @@ -10,10 +10,10 @@ MCPU="baseline" |
| 10 | 10 | # This will affect the cmake command below. |
| 11 | 11 | git config core.abbrev 9 |
| 12 | 12 | |
| 13 | | echo "BUILD debug zig with zig:$($ZIG version)" |
| 13 | echo "building debug zig with zig version $($OLD_ZIG version)" |
| 14 | 14 | |
| 15 | | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" |
| 16 | | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" |
| 15 | export CC="$OLD_ZIG cc -target $TARGET -mcpu=$MCPU" |
| 16 | export CXX="$OLD_ZIG c++ -target $TARGET -mcpu=$MCPU" |
| 17 | 17 | |
| 18 | 18 | mkdir _debug |
| 19 | 19 | cd _debug |
| ... | ... | @@ -33,52 +33,44 @@ unset CXX |
| 33 | 33 | |
| 34 | 34 | ninja install |
| 35 | 35 | |
| 36 | | ZIG="$DEBUG_STAGING/bin/zig" |
| 36 | STAGE1_ZIG="$DEBUG_STAGING/bin/zig" |
| 37 | 37 | |
| 38 | 38 | # Here we rebuild zig but this time using the Zig binary we just now produced to |
| 39 | 39 | # build zig1.o rather than relying on the one built with stage0. See |
| 40 | 40 | # https://github.com/ziglang/zig/issues/6830 for more details. |
| 41 | | cmake .. -DZIG_EXECUTABLE="$ZIG" |
| 41 | cmake .. -DZIG_EXECUTABLE="$STAGE1_ZIG" |
| 42 | 42 | ninja install |
| 43 | 43 | |
| 44 | 44 | cd $WORKSPACE |
| 45 | 45 | |
| 46 | | # Look for non-conforming code formatting. |
| 47 | | # Formatting errors can be fixed by running `zig fmt` on the files printed here. |
| 48 | | $ZIG fmt --check . --exclude test/cases/ |
| 46 | echo "Looking for non-conforming code formatting..." |
| 47 | echo "Formatting errors can be fixed by running 'zig fmt' on the files printed here." |
| 48 | $STAGE1_ZIG fmt --check . --exclude test/cases/ |
| 49 | 49 | |
| 50 | | # Build stage2 standalone so that we can test stage2 against stage2 compiler-rt. |
| 51 | | $ZIG build -p stage2 -Dstatic-llvm -Dtarget=native-native-musl --search-prefix "$DEPS_LOCAL" |
| 52 | | |
| 53 | | # Ensure that stage2 can build itself. |
| 50 | $STAGE1_ZIG build -p stage2 -Dstatic-llvm -Dtarget=native-native-musl --search-prefix "$DEPS_LOCAL" |
| 54 | 51 | stage2/bin/zig build -p stage3 -Dstatic-llvm -Dtarget=native-native-musl --search-prefix "$DEPS_LOCAL" |
| 55 | | stage2/bin/zig build # test building self-hosted without LLVM |
| 56 | | stage2/bin/zig build -Dtarget=arm-linux-musleabihf # test building self-hosted for 32-bit arm |
| 57 | | |
| 58 | | # Here we use stage2 instead of stage3 because of two bugs remaining: |
| 59 | | # * https://github.com/ziglang/zig/issues/11367 (and corresponding workaround in compiler source) |
| 60 | | # * https://github.com/ziglang/zig/pull/11492#issuecomment-1112871321 |
| 61 | | stage2/bin/zig build test-behavior -fqemu -fwasmtime |
| 62 | | stage2/bin/zig test lib/std/std.zig --zig-lib-dir lib |
| 63 | | |
| 64 | | $ZIG build test-behavior -fqemu -fwasmtime -Domit-stage2 |
| 65 | | $ZIG build test-compiler-rt -fqemu -fwasmtime |
| 66 | | $ZIG build test-std -fqemu -fwasmtime |
| 67 | | $ZIG build test-universal-libc -fqemu -fwasmtime |
| 68 | | $ZIG build test-compare-output -fqemu -fwasmtime |
| 69 | | $ZIG build test-standalone -fqemu -fwasmtime |
| 70 | | $ZIG build test-stack-traces -fqemu -fwasmtime |
| 71 | | $ZIG build test-cli -fqemu -fwasmtime |
| 72 | | $ZIG build test-asm-link -fqemu -fwasmtime |
| 73 | | $ZIG build test-translate-c -fqemu -fwasmtime |
| 74 | | $ZIG build test-run-translated-c -fqemu -fwasmtime |
| 75 | | $ZIG build docs -fqemu -fwasmtime |
| 76 | | $ZIG build test-fmt -fqemu -fwasmtime |
| 77 | | $ZIG build test-cases -fqemu -fwasmtime |
| 52 | stage3/bin/zig build # test building self-hosted without LLVM |
| 53 | stage3/bin/zig build -Dtarget=arm-linux-musleabihf # test building self-hosted for 32-bit arm |
| 54 | |
| 55 | stage3/bin/zig build test-compiler-rt -fqemu -fwasmtime -Denable-llvm |
| 56 | stage3/bin/zig build test-behavior -fqemu -fwasmtime -Denable-llvm |
| 57 | stage3/bin/zig build test-std -fqemu -fwasmtime -Denable-llvm |
| 58 | stage3/bin/zig build test-compare-output -fqemu -fwasmtime -Denable-llvm |
| 59 | stage3/bin/zig build test-asm-link -fqemu -fwasmtime -Denable-llvm |
| 60 | stage3/bin/zig build test-fmt -fqemu -fwasmtime -Denable-llvm |
| 61 | |
| 62 | $STAGE1_ZIG build test-universal-libc -fqemu -fwasmtime |
| 63 | $STAGE1_ZIG build test-standalone -fqemu -fwasmtime |
| 64 | $STAGE1_ZIG build test-stack-traces -fqemu -fwasmtime |
| 65 | $STAGE1_ZIG build test-cli -fqemu -fwasmtime |
| 66 | $STAGE1_ZIG build test-translate-c -fqemu -fwasmtime |
| 67 | $STAGE1_ZIG build test-run-translated-c -fqemu -fwasmtime |
| 68 | $STAGE1_ZIG build docs -fqemu -fwasmtime |
| 69 | $STAGE1_ZIG build test-cases -fqemu -fwasmtime |
| 78 | 70 | |
| 79 | 71 | # Produce the experimental std lib documentation. |
| 80 | 72 | mkdir -p "$RELEASE_STAGING/docs/std" |
| 81 | | $ZIG test lib/std/std.zig \ |
| 73 | $STAGE1_ZIG test lib/std/std.zig \ |
| 82 | 74 | --zig-lib-dir lib \ |
| 83 | 75 | -femit-docs=$RELEASE_STAGING/docs/std \ |
| 84 | 76 | -fno-emit-bin |
| ... | ... | @@ -87,7 +79,7 @@ $ZIG test lib/std/std.zig \ |
| 87 | 79 | tidy --drop-empty-elements no -qe zig-cache/langref.html |
| 88 | 80 | |
| 89 | 81 | # Build release zig. |
| 90 | | $ZIG build \ |
| 82 | $STAGE1_ZIG build \ |
| 91 | 83 | --prefix "$RELEASE_STAGING" \ |
| 92 | 84 | --search-prefix "$DEPS_LOCAL" \ |
| 93 | 85 | -Dstatic-llvm \ |