@@ -21,8 +21,6 @@ case $TARGET_OS_CMAKE in
21
21
native) TARGET_OS_CMAKE=" " ;;
22
22
esac
23
23
24
- export CMAKE_GENERATOR=" Unix Makefiles"
25
-
26
24
# First build the libraries for Zig to link against, as well as native `llvm-tblgen`.
27
25
mkdir -p " $ROOTDIR /out/build-llvm-host"
28
26
cd " $ROOTDIR /out/build-llvm-host"
@@ -43,7 +41,7 @@ cmake "$ROOTDIR/llvm" \
43
41
-DCLANG_INCLUDE_DOCS=OFF \
44
42
-DLLVM_INCLUDE_DOCS=OFF \
45
43
-DCMAKE_BUILD_TYPE=Release
46
- make " $JOBS " install
44
+ cmake --build . " $JOBS " --target install
47
45
48
46
# Now we build Zig, still with system C/C++ compiler, linking against LLVM,
49
47
# Clang, LLD we just built from source.
@@ -54,7 +52,7 @@ cmake "$ROOTDIR/zig" \
54
52
-DCMAKE_PREFIX_PATH=" $ROOTDIR /out/host" \
55
53
-DCMAKE_BUILD_TYPE=Release \
56
54
-DZIG_VERSION=" $ZIG_VERSION "
57
- make " $JOBS " install
55
+ cmake --build . " $JOBS " --target install
58
56
59
57
# Now we have Zig as a cross compiler.
60
58
ZIG=" $ROOTDIR /out/host/bin/zig"
@@ -75,7 +73,7 @@ cmake "$ROOTDIR/zlib" \
75
73
-DCMAKE_RC_COMPILER=" $ROOTDIR /out/host/bin/llvm-rc" \
76
74
-DCMAKE_AR=" $ROOTDIR /out/host/bin/llvm-ar" \
77
75
-DCMAKE_RANLIB=" $ROOTDIR /out/host/bin/llvm-ranlib"
78
- make " $JOBS " install
76
+ cmake --build . " $JOBS " --target install
79
77
80
78
# Same deal for zstd.
81
79
# The build system for zstd is whack so I just put all the files here.
@@ -163,13 +161,13 @@ cmake "$ROOTDIR/llvm" \
163
161
-DLIBCLANG_BUILD_STATIC=ON \
164
162
-DLLVM_DEFAULT_TARGET_TRIPLE=" $TARGET "
165
163
cd " $ROOTDIR /out/build-llvm-$TARGET -$MCPU /tools/lld"
166
- make " $JOBS " install
164
+ cmake --build . " $JOBS " --target install
167
165
cd " $ROOTDIR /out/build-llvm-$TARGET -$MCPU /tools/clang/lib"
168
- make " $JOBS " install
166
+ cmake --build . " $JOBS " --target install
169
167
cd " $ROOTDIR /out/build-llvm-$TARGET -$MCPU /lib"
170
- make " $JOBS " install
168
+ cmake --build . " $JOBS " --target install
171
169
cd " $ROOTDIR /out/build-llvm-$TARGET -$MCPU "
172
- make " $JOBS " install-llvm-headers install-clang-headers install-LLVMSupport install-LLVMDemangle
170
+ cmake --build . " $JOBS " --target install-llvm-headers install-clang-headers install-LLVMSupport install-LLVMDemangle
173
171
174
172
# Finally, we can cross compile Zig itself, with Zig.
175
173
cd " $ROOTDIR /zig"
0 commit comments