authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-15 01:44:17-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-15 01:44:17-07:00
logfa633a658f75d461da00fad9a72456e1420d2d62
tree8d89f47afa51821e5a8009e5c9665bcf40415eb2
parent4a1d3465cc784cbaf06b0747f520e08dac95e092

ci: windows: try the dev kit strategy


1 files changed, 4 insertions(+), 31 deletions(-)

ci/azure/windows_script+4-31
...@@ -17,8 +17,6 @@ cd "$HOME"...@@ -17,8 +17,6 @@ cd "$HOME"
17wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"17wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
18tar xf "$CACHE_BASENAME.tar.xz"18tar xf "$CACHE_BASENAME.tar.xz"
1919
20ln -s "$PREFIX/bin/llvm-ar.exe" "$PREFIX/bin/llvm-ranlib.exe"
21
22cd "$ZIGDIR"20cd "$ZIGDIR"
2321
24# Make the `zig version` number consistent.22# Make the `zig version` number consistent.
...@@ -27,37 +25,12 @@ git config core.abbrev 9...@@ -27,37 +25,12 @@ git config core.abbrev 9
27git fetch --unshallow || true25git fetch --unshallow || true
28git fetch --tags26git fetch --tags
2927
30export CC="$ZIG cc -fno-sanitize=all -target x86_64-windows-gnu -mcpu=native"
31export CXX="$ZIG c++ -fno-sanitize=all -target x86_64-windows-gnu -mcpu=native"
32
33mkdir build28mkdir build
34cd build29cd build
35cmake .. -DCMAKE_BUILD_TYPE=Release \30"$ZIG" build -Dstage1 -Dtarget=x86_64-windows-gnu \
36 "-DCMAKE_PREFIX_PATH=$PREFIX" \31 --search-prefix "$PREFIX" \
37 "-DCMAKE_INSTALL_PREFIX=$(pwd)/dist" \32 --override-lib-dir "$ZIGDIR/lib" \
38 -DCMAKE_CROSSCOMPILING=True \33 --prefix "$(pwd)/dist"
39 -DCMAKE_SYSTEM_NAME="Windows" \
40 -DCMAKE_AR="$PREFIX/bin/llvm-ar.exe" \
41 -DCMAKE_RANLIB="$PREFIX/bin/llvm-ranlib.exe" \
42 -DZIG_OMIT_STAGE2=ON \
43 -DZIG_STATIC=ON \
44 -DZIG_TARGET_TRIPLE="x86_64-windows-gnu" \
45 -DZIG_TARGET_MCPU="baseline" \
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.
50unset CC
51unset CXX
52
53ninja install
54
55# Here we rebuild zig but this time using the Zig binary we just now produced to
56# build zig1.o rather than relying on the one built with stage0. See
57# https://github.com/ziglang/zig/issues/6830 for more details.
58cmake .. -DZIG_EXECUTABLE="$(pwd)/dist/bin/zig.exe" -DZIG_TARGET_MCPU="x86_64_v2"
59ninja install
60
6134
62dist/bin/zig.exe build test-behavior -Dskip-non-native35dist/bin/zig.exe build test-behavior -Dskip-non-native
63# Disabled to prevent OOM36# Disabled to prevent OOM