| author | |
| committer | |
| log | c59241bda00376b5a6ee20ca52358329b7482f7f |
| tree | 7aad79d042ab738054c337cf99ea0f1546914756 |
| parent | 553fbeba825653da8be8040be1c0b4d4fe025066 |
3 files changed, 30 insertions(+), 8 deletions(-)
ci/azure/macos_script+2-2| ... | @@ -38,7 +38,7 @@ cmake .. \ | ... | @@ -38,7 +38,7 @@ cmake .. \ |
| 38 | -DCMAKE_PREFIX_PATH="$PREFIX" \ | 38 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 39 | -DCMAKE_BUILD_TYPE=Release \ | 39 | -DCMAKE_BUILD_TYPE=Release \ |
| 40 | -DZIG_TARGET_TRIPLE="$ARCH-native-gnu" \ | 40 | -DZIG_TARGET_TRIPLE="$ARCH-native-gnu" \ |
| 41 | -DZIG_TARGET_MCPU="x86_64_v2" \ | 41 | -DZIG_TARGET_MCPU="baseline" \ |
| 42 | -DZIG_STATIC=ON | 42 | -DZIG_STATIC=ON |
| 43 | 43 | ||
| 44 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | 44 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables |
| ... | @@ -52,7 +52,7 @@ make $JOBS install | ... | @@ -52,7 +52,7 @@ make $JOBS install |
| 52 | # Here we rebuild zig but this time using the Zig binary we just now produced to | 52 | # Here we rebuild zig but this time using the Zig binary we just now produced to |
| 53 | # build zig1.o rather than relying on the one built with stage0. See | 53 | # build zig1.o rather than relying on the one built with stage0. See |
| 54 | # https://github.com/ziglang/zig/issues/6830 for more details. | 54 | # https://github.com/ziglang/zig/issues/6830 for more details. |
| 55 | cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" | 55 | cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig" -DZIG_TARGET_MCPU="x86_64_v2" |
| 56 | make $JOBS install | 56 | make $JOBS install |
| 57 | 57 | ||
| 58 | release/bin/zig build test | 58 | release/bin/zig build test |
ci/azure/windows_script+7-5| ... | @@ -25,18 +25,20 @@ git config core.abbrev 9 | ... | @@ -25,18 +25,20 @@ git config core.abbrev 9 |
| 25 | git fetch --unshallow || true | 25 | git fetch --unshallow || true |
| 26 | git fetch --tags | 26 | git fetch --tags |
| 27 | 27 | ||
| 28 | export CC="$ZIG cc" | 28 | export CC="$ZIG cc -fno-sanitize=all -target x86_64-windows-gnu -mcpu=native" |
| 29 | export CXX="$ZIG c++" | 29 | export CXX="$ZIG c++ -fno-sanitize=all -target x86_64-windows-gnu -mcpu=native" |
| 30 | 30 | ||
| 31 | mkdir build | 31 | mkdir build |
| 32 | cd build | 32 | cd build |
| 33 | cmake .. -DCMAKE_BUILD_TYPE=Release \ | 33 | cmake .. -DCMAKE_BUILD_TYPE=Release \ |
| 34 | "-DCMAKE_PREFIX_PATH=$PREFIX" \ | 34 | "-DCMAKE_PREFIX_PATH=$PREFIX" \ |
| 35 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/dist" \ | 35 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/dist" \ |
| 36 | -DCMAKE_CROSSCOMPILING=True \ | ||
| 37 | -DCMAKE_SYSTEM_NAME="Windows" \ | ||
| 36 | -DZIG_OMIT_STAGE2=ON \ | 38 | -DZIG_OMIT_STAGE2=ON \ |
| 37 | -DZIG_STATIC=ON \ | 39 | -DZIG_STATIC=ON \ |
| 38 | -DZIG_TARGET_TRIPLE="x86_64-native-gnu" \ | 40 | -DZIG_TARGET_TRIPLE="x86_64-windows-gnu" \ |
| 39 | -DZIG_TARGET_MCPU="x86_64_v2" \ | 41 | -DZIG_TARGET_MCPU="baseline" \ |
| 40 | -GNinja | 42 | -GNinja |
| 41 | 43 | ||
| 42 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables | 44 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables |
| ... | @@ -49,7 +51,7 @@ ninja install | ... | @@ -49,7 +51,7 @@ ninja install |
| 49 | # Here we rebuild zig but this time using the Zig binary we just now produced to | 51 | # Here we rebuild zig but this time using the Zig binary we just now produced to |
| 50 | # build zig1.o rather than relying on the one built with stage0. See | 52 | # build zig1.o rather than relying on the one built with stage0. See |
| 51 | # https://github.com/ziglang/zig/issues/6830 for more details. | 53 | # https://github.com/ziglang/zig/issues/6830 for more details. |
| 52 | cmake .. -DZIG_EXECUTABLE="$(pwd)/dist/bin/zig.exe" | 54 | cmake .. -DZIG_EXECUTABLE="$(pwd)/dist/bin/zig.exe" -DZIG_TARGET_MCPU="x86_64_v2" |
| 53 | ninja install | 55 | ninja install |
| 54 | 56 | ||
| 55 | 57 |
ci/srht/freebsd_script+21-1| ... | @@ -14,6 +14,13 @@ cd $HOME | ... | @@ -14,6 +14,13 @@ 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 | |||
| 17 | cd $ZIGDIR | 24 | cd $ZIGDIR |
| 18 | 25 | ||
| 19 | # Make the `zig version` number consistent. | 26 | # Make the `zig version` number consistent. |
| ... | @@ -35,8 +42,21 @@ cmake .. \ | ... | @@ -35,8 +42,21 @@ cmake .. \ |
| 35 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/release" \ | 42 | "-DCMAKE_INSTALL_PREFIX=$(pwd)/release" \ |
| 36 | -DZIG_STATIC=ON \ | 43 | -DZIG_STATIC=ON \ |
| 37 | -DZIG_TARGET_TRIPLE="x86_64-native-gnu" \ | 44 | -DZIG_TARGET_TRIPLE="x86_64-native-gnu" \ |
| 38 | -DZIG_TARGET_MCPU="x86_64_v2" \ | 45 | -DZIG_TARGET_MCPU="baseline" \ |
| 39 | -GNinja | 46 | -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" | ||
| 40 | samu install | 60 | samu install |
| 41 | 61 | ||
| 42 | # Here we skip some tests to save time. | 62 | # Here we skip some tests to save time. |