summaryrefslogtreecommitdiff
path: root/bootstrap.bat
blob: 7f236fc9aa496056db21e52ea1eb9bd64a6819b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off

set CXX=cl.exe
set CC=cl.exe
set AR=lib.exe
set LD=link.exe

cl /nologo /std:c++20 /D_X86_ /EHsc /Isrc /Fo:build\ ctor.cc src\bootstrap.cc /link /out:ctor.exe
if %errorlevel% neq 0 exit /b %errorlevel%

ctor.exe
if %errorlevel% neq 0 exit /b %errorlevel%

cl /nologo /std:c++20 /D_X86_ /EHsc /Isrc /Fo:build\ ctor.cc /c
if %errorlevel% neq 0 exit /b %errorlevel%
cl /nologo /std:c++20 /D_X86_ /EHsc /Isrc /Fo:build\test\ test\ctor.cc /c
if %errorlevel% neq 0 exit /b %errorlevel%
link /nologo build\libctor.lib build\ctor.obj build\test\ctor.obj /subsystem:console /out:ctor.exe
if %errorlevel% neq 0 exit /b %errorlevel%

ctor.exe configure --ctor-includedir=src --ctor-libdir=build
if %errorlevel% neq 0 exit /b %errorlevel%