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