Skip to content

Commit 9084cb2

Browse files
committed
add blocksruntime phase
1 parent 614d791 commit 9084cb2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

phases/17-blocksruntime.bat

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@echo off
2+
setlocal
3+
4+
set PROJECT=blocksruntime
5+
set GITHUB_REPO=hmelder/swift-corelibs-blocksruntime
6+
set TAG=blocks-rt-win32
7+
8+
:: load environment and prepare project
9+
call "%~dp0\..\scripts\common.bat" prepare_project || exit /b 1
10+
11+
set BUILD_DIR="%SRCROOT%\%PROJECT%\build-%ARCH%-%BUILD_TYPE%"
12+
if exist "%BUILD_DIR%" (rmdir /S /Q "%BUILD_DIR%" || exit /b 1)
13+
mkdir "%BUILD_DIR%" || exit /b 1
14+
cd "%BUILD_DIR%" || exit /b 1
15+
16+
echo.
17+
echo ### Running cmake
18+
:: CXX and linker flags below are to produce PDBs for release builds.
19+
cmake .. %CMAKE_OPTIONS% ^
20+
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/Zi" ^
21+
-D CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
22+
|| exit /b 1
23+
24+
echo.
25+
echo ### Building
26+
ninja || exit /b 1
27+
28+
echo.
29+
echo ### Installing
30+
ninja install || exit /b 1
31+
32+
:: install PDB file
33+
xcopy /Y /F BlocksRuntime.pdb "%INSTALL_PREFIX%\bin\" || exit /b 1

0 commit comments

Comments
 (0)