File tree 5 files changed +36
-7
lines changed
5 files changed +36
-7
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,14 @@ if(NOT CMAKE_INSTALL_PREFIX)
10
10
"Directory to install zig to" FORCE)
11
11
endif ()
12
12
13
+ set (CMAKE_USER_MAKE_RULES_OVERRIDE
14
+ ${CMAKE_CURRENT_SOURCE_DIR} /cmake/c_flag_overrides.cmake)
15
+ set (CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
16
+ ${CMAKE_CURRENT_SOURCE_DIR} /cmake/cxx_flag_overrides.cmake)
17
+
13
18
project (zig C CXX)
14
19
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
15
20
16
-
17
21
set (ZIG_VERSION_MAJOR 0)
18
22
set (ZIG_VERSION_MINOR 5)
19
23
set (ZIG_VERSION_PATCH 0)
Original file line number Diff line number Diff line change 6
6
pacman -Su --needed --noconfirm
7
7
pacman -S --needed --noconfirm wget p7zip python3-pip
8
8
pip install s3cmd
9
- wget -nv " https://ziglang.org/deps/llvm%2bclang-9.0.0-win64-msvc-release .tar.xz"
10
- tar xf llvm+clang-9.0.0-win64-msvc-release .tar.xz
9
+ wget -nv " https://ziglang.org/deps/llvm%2bclang-9.0.0-win64-msvc-mt .tar.xz"
10
+ tar xf llvm+clang-9.0.0-win64-msvc-mt .tar.xz
Original file line number Diff line number Diff line change @@ -11,15 +11,14 @@ SET "MSYSTEM=%PREVMSYSTEM%"
11
11
12
12
SET " ZIGBUILDDIR = %SRCROOT% \build"
13
13
SET " ZIGINSTALLDIR = %ZIGBUILDDIR% \dist"
14
- SET " ZIGPREFIXPATH = %SRCROOT% \llvm+clang-9.0.0-win64-msvc-release "
14
+ SET " ZIGPREFIXPATH = %SRCROOT% \llvm+clang-9.0.0-win64-msvc-mt "
15
15
16
16
call " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
17
17
18
18
mkdir %ZIGBUILDDIR%
19
19
cd %ZIGBUILDDIR%
20
- REM Here we use MinSizeRel instead of Release to work around https://github.com/ziglang/zig/issues/3024
21
- cmake.exe .. -Thost=x64 -G" Visual Studio 16 2019" -A x64 " -DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR% " " -DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH% " -DCMAKE_BUILD_TYPE=MinSizeRel || exit /b
22
- msbuild /maxcpucount /p:Configuration=MinSizeRel INSTALL.vcxproj || exit /b
20
+ cmake.exe .. -Thost=x64 -G" Visual Studio 16 2019" -A x64 " -DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR% " " -DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH% " -DCMAKE_BUILD_TYPE=Release || exit /b
21
+ msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
23
22
24
23
" %ZIGINSTALLDIR% \bin\zig.exe" build test || exit /b
25
24
Original file line number Diff line number Diff line change
1
+ if (MSVC )
2
+ set (CMAKE_C_FLAGS_DEBUG_INIT
3
+ "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" )
4
+
5
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT
6
+ "/MT /O1 /Ob1 /D NDEBUG" )
7
+
8
+ set (CMAKE_C_FLAGS_RELEASE_INIT
9
+ "/MT /O2 /Ob1 /D NDEBUG" )
10
+
11
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT
12
+ "/MT /Zi /O2 /Ob1 /D NDEBUG" )
13
+ endif ()
Original file line number Diff line number Diff line change
1
+ if (MSVC )
2
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT
3
+ "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" )
4
+
5
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT
6
+ "/MT /O1 /Ob1 /D NDEBUG" )
7
+
8
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT
9
+ "/MT /O2 /Ob1 /D NDEBUG" )
10
+
11
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT
12
+ "/MT /Zi /O2 /Ob1 /D NDEBUG" )
13
+ endif ()
You can’t perform that action at this time.
0 commit comments