| ... | @@ -14,13 +14,6 @@ cd $HOME | ... | @@ -14,13 +14,6 @@ cd $HOME |
| 14 | wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" | 14 | wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" |
| 15 | tar xf "$CACHE_BASENAME.tar.xz" | 15 | tar xf "$CACHE_BASENAME.tar.xz" |
| 16 | | 16 | |
| 17 | ZIG="$PREFIX/bin/zig" | | |
| 18 | NATIVE_LIBC_TXT="$HOME/native_libc.txt" | | |
| 19 | $ZIG libc > "$NATIVE_LIBC_TXT" | | |
| 20 | export ZIG_LIBC="$NATIVE_LIBC_TXT" | | |
| 21 | export CC="$ZIG cc" | | |
| 22 | export CXX="$ZIG c++" | | |
| 23 | | | |
| 24 | cd $ZIGDIR | 17 | cd $ZIGDIR |
| 25 | | 18 | |
| 26 | # Make the `zig version` number consistent. | 19 | # Make the `zig version` number consistent. |
| ... | @@ -41,22 +34,8 @@ cmake .. \ | ... | @@ -41,22 +34,8 @@ cmake .. \ |
| 41 | -DCMAKE_PREFIX_PATH=$PREFIX \ | 34 | -DCMAKE_PREFIX_PATH=$PREFIX \ |
| 42 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/release" \ | 35 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/release" \ |
| 43 | -DZIG_STATIC=ON \ | 36 | -DZIG_STATIC=ON \ |
| 44 | -DZIG_TARGET_TRIPLE="x86_64-native-gnu" \ | 37 | -DZIG_TARGET_TRIPLE=x86_64-freebsd-gnu \ |
| 45 | -DZIG_TARGET_MCPU="baseline" \ | | |
| 46 | -GNinja | 38 | -GNinja |
| 47 | | | |
| 48 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | | |
| 49 | # so that installation and testing do not get affected by them. | | |
| 50 | unset CC | | |
| 51 | unset CXX | | |
| 52 | unset ZIG_LIBC | | |
| 53 | | | |
| 54 | samu install | | |
| 55 | | | |
| 56 | # Here we rebuild zig but this time using the Zig binary we just now produced to | | |
| 57 | # build zig1.o rather than relying on the one built with stage0. See | | |
| 58 | # https://github.com/ziglang/zig/issues/6830 for more details. | | |
| 59 | cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" -DZIG_TARGET_MCPU="x86_64_v2" | | |
| 60 | samu install | 39 | samu install |
| 61 | | 40 | |
| 62 | # Here we skip some tests to save time. | 41 | # Here we skip some tests to save time. |