PageRenderTime 639ms CodeModel.GetById 410ms app.highlight 84ms RepoModel.GetById 140ms app.codeStats 0ms

/PCbuild/build_clang.bat

http://unladen-swallow.googlecode.com/
Batch | 28 lines | 21 code | 7 blank | 0 comment | 5 complexity | 039275ba2723fe39ad3dc10656a903bf MD5 | raw file
 1@echo off
 2
 3set CONFIGURATION=%1
 4set PLATFORM=%2
 5set INPUT=%3
 6set BITCODE=%4
 7set BCLIBRARY_UNOPT=%5
 8set BCLIBRARY=%6
 9
10set LLVM_BIN="C:\LLVM\Release\bin"
11set CLANG="%LLVM_BIN%\clang"
12set LLVM_LINK="%LLVM_BIN%\llvm-link"
13set OPT="%LLVM_BIN%\opt"
14
15set CFLAGS=-I.. -I..\Include -I..\PC -D_USRDLL -DPy_BUILD_CORE -DPy_ENABLE_SHARED -DWIN32 -D_WIN32
16if "%CONFIGURATION%"=="Debug" set CFLAGS=%CFLAGS% -D_DEBUG
17if "%PLATFORM%"=="x64" set CFLAGS=%CFLAGS% -D_WIN64
18for /F "delims=;" %%I in ("%INCLUDE%") do set CFLAGS=%CFLAGS% -I"%%I"
19
20%CLANG% -O3 -emit-llvm -c %CFLAGS% %INPUT% -o %BITCODE%
21if ERRORLEVEL 1 goto end
22
23%LLVM_LINK% -o %BCLIBRARY_UNOPT% %BITCODE%
24if ERRORLEVEL 1 goto end
25
26%OPT% -o %BCLIBRARY% -O3 %BCLIBRARY_UNOPT%
27
28:end