Skip to content

Instantly share code, notes, and snippets.

@whizzter
Created November 18, 2017 09:45
Show Gist options
  • Save whizzter/a750446d9ffd3e1c2a1f3645f45922b9 to your computer and use it in GitHub Desktop.
Save whizzter/a750446d9ffd3e1c2a1f3645f45922b9 to your computer and use it in GitHub Desktop.
cling building on windows nov2017
With visual studio 2015 begin with upgrading to update3 since there's warnings about lower versions in the build scripts.
Also make sure python is in the path (tried with python2)
Building win32 won't work, neither CL toolset nor final binary will work. Stick to x64
Start with ahmidous comment https://github.com/root-project/cling/issues/186#issuecomment-341898792
git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches
cd ../..
mkdir build
cd build
rem Pick one of the ones below depending on visual studio 2015 or 2017
cmake -DCMAKE_INSTALL_PREFIX=c:/cling -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 14 Win64" -Thost=x64 ..
cmake -DCMAKE_INSTALL_PREFIX=C:/CLING -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017 Win64" -Thost=x64 ..
rem Then either do (debug is the default taking around 40gb of space while the Release build is more facile at 8gb)
rem Release is probably preferable in terms of performance anyhow.
msbuild llvm.sln /p:Configuration=Release
msbuild llvm.sln /p:Configuration=Debug
There is some WIN32 define for cling that isn't set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment