Skip to content

Commit 63652fc

Browse files
author
Daniel Kroening
committed
add clcache to Windows build
This sets up clcache for the AWS Codebuild Windows builds. clcache is a clone of ccache for Visual Studio CL.
1 parent 6f72b3b commit 63652fc

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

buildspec-windows.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ phases:
55
commands:
66
- choco install cyg-get -y --no-progress
77
- cyg-get bash patch bison flex make wget perl
8+
- nuget install clcache -OutputDirectory "c:\tools" -ExcludeVersion -Version 4.1.0
89

910
build:
1011
commands:
@@ -13,14 +14,22 @@ phases:
1314
C:\tools\cygwin\bin\bash -c "make -C src minisat2-download DOWNLOADER=wget"
1415
1516
- |
16-
$env:Path = "C:\tools\cygwin\bin;$env:Path"
17-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C src BUILD_ENV=MSVC" '
18-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C unit all BUILD_ENV=MSVC" '
17+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
18+
$env:CLCACHE_DIR = "C:\clcache"
19+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C src BUILD_ENV=MSVC" '
20+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C unit all BUILD_ENV=MSVC" '
1921
2022
- |
21-
$env:Path = "C:\tools\cygwin\bin;$env:Path"
22-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make -j4 -C jbmc/src BUILD_ENV=MSVC" '
23-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/unit all BUILD_ENV=MSVC" '
23+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
24+
$env:CLCACHE_DIR = "C:\clcache"
25+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make CXX=clcache.exe -j4 -C jbmc/src BUILD_ENV=MSVC" '
26+
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C jbmc/unit all BUILD_ENV=MSVC" '
27+
28+
- |
29+
# display cache stats
30+
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
31+
$env:CLCACHE_DIR = "C:\clcache"
32+
cmd /c 'clcache -s'
2433
2534
post_build:
2635
commands:
@@ -72,3 +81,4 @@ artifacts:
7281

7382
cache:
7483
paths:
84+
- 'c:\clcache'

0 commit comments

Comments
 (0)