| author | |
| committer | |
| log | 0cb1c1696f4bf19a8652100f5ee62262d51b0127 |
| tree | 53813e1c75490e6cd19088bd057de21f640023b8 |
| parent | f80c01f9d8367ee904d8e01666cd6136dafd6213 |
| parent | 93295f3b134e58477e4f28be378123ceb6d1ddfe |
| signature |
Fully static stage1 compiler on windows5 files changed, 36 insertions(+), 7 deletions(-)
CMakeLists.txt+5-1| ... | ... | @@ -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) |
ci/azure/windows_install+2-2| ... | ... | @@ -6,5 +6,5 @@ set -e |
| 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 |
ci/azure/windows_script.bat+3-4| ... | ... | @@ -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 |
cmake/c_flag_overrides.cmake created+13| ... | ... | @@ -0,0 +1,13 @@ |
| 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() |
cmake/cxx_flag_overrides.cmake created+13| ... | ... | @@ -0,0 +1,13 @@ |
| 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() |