parent
cbb6d2239f
commit
1d88f9b9a6
|
@ -149,7 +149,7 @@ else()
|
|||
add_library(embedded_lld_elf ${EMBEDDED_LLD_ELF_SOURCES})
|
||||
add_library(embedded_lld_coff ${EMBEDDED_LLD_COFF_SOURCES})
|
||||
if(MSVC)
|
||||
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS")
|
||||
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS /w")
|
||||
else()
|
||||
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment")
|
||||
endif()
|
||||
|
@ -303,7 +303,7 @@ set(EMBEDDED_SOFTFLOAT_SOURCES
|
|||
add_library(embedded_softfloat ${EMBEDDED_SOFTFLOAT_SOURCES})
|
||||
if(MSVC)
|
||||
set_target_properties(embedded_softfloat PROPERTIES
|
||||
COMPILE_FLAGS "-std=c99"
|
||||
COMPILE_FLAGS "-std=c99 /w"
|
||||
)
|
||||
else()
|
||||
set_target_properties(embedded_softfloat PROPERTIES
|
||||
|
@ -359,7 +359,7 @@ include_directories(
|
|||
)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /w")
|
||||
elseif(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Werror -Wno-error=format= -Wno-error=format -Wno-error=format-extra-args")
|
||||
else()
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
@echo on
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
build-msvc-release\bin\zig.exe version >version.txt
|
||||
set /p ZIGVERSION=<version.txt
|
||||
SET "RELEASEDIR=zig-%ZIGVERSION%"
|
||||
mkdir "%RELEASEDIR%"
|
||||
move build-msvc-release\bin\zig.exe "%RELEASEDIR%"
|
||||
move build-msvc-release\lib "%RELEASEDIR%"
|
||||
|
||||
SET "RELEASEZIP=zig-%ZIGVERSION%.zip"
|
||||
|
||||
7z a "%RELEASEZIP%" "%RELEASEDIR%"
|
||||
appveyor PushArtifact "%RELEASEZIP%"
|
|
@ -3,3 +3,7 @@ platform:
|
|||
- x64
|
||||
build_script:
|
||||
- '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\build_script.bat'
|
||||
after_build:
|
||||
- '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\after_build.bat'
|
||||
cache:
|
||||
- 'llvm+clang-5.0.0-win64-msvc-release.tar.xz'
|
||||
|
|
|
@ -1,11 +1,37 @@
|
|||
@echo on
|
||||
echo %APPVEYOR_BUILD_FOLDER%
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
SET "PREVPATH=%PATH%"
|
||||
SET "PREVMSYSEM=%MSYSTEM%"
|
||||
|
||||
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
|
||||
SET "MSYSTEM=MINGW64"
|
||||
SET "APPVEYOR_CACHE_ENTRY_ZIP_ARGS=-m0=Copy"
|
||||
|
||||
bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-5.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/superjoe/temp/llvm%%2bclang-5.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-5.0.0-win64-msvc-release.tar.xz" || exit /b
|
||||
|
||||
|
||||
SET "PATH=%PREVPATH%"
|
||||
SET "MSYSTEM=%PREVMSYSTEM%"
|
||||
SET "ZIGBUILDDIR=%APPVEYOR_BUILD_FOLDER%\build-msvc-release"
|
||||
SET "ZIGPREFIXPATH=%APPVEYOR_BUILD_FOLDER%\llvm+clang-5.0.0-win64-msvc-release"
|
||||
|
||||
mkdir %ZIGBUILDDIR%
|
||||
cd %ZIGBUILDDIR%
|
||||
cmake.exe .. -Thost=x64 -G"Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGBUILDDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release "-DZIG_LIBC_INCLUDE_DIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" "-DZIG_LIBC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" "-DZIG_LIBC_STATIC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" || exit /b
|
||||
msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b
|
||||
|
||||
bin\zig.exe build --build-file ..\build.zig test || exit /b
|
||||
|
||||
@echo "MSVC build succeeded, proceeding with MinGW build"
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
|
||||
SET "MSYSTEM=MINGW64"
|
||||
|
||||
bash -lc "pacman -Syu --needed --noconfirm"
|
||||
bash -lc "pacman -Su --needed --noconfirm"
|
||||
|
||||
bash -lc "pacman -S --needed --noconfirm make mingw64/mingw-w64-x86_64-make mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-clang mingw64/mingw-w64-x86_64-llvm mingw64/mingw-w64-x86_64-lld mingw64/mingw-w64-x86_64-gcc"
|
||||
|
||||
bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && mkdir build && cd build && cmake .. -G""MSYS Makefiles"" -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 ""End of search list."" | head -n1 | cut -c 2- | sed ""s/ .*//"") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-name=crtbegin.o)) && make && make install"
|
||||
|
||||
@echo "MinGW build successful"
|
||||
|
|
Loading…
Reference in New Issue