Skip to content

Commit

Permalink
build_llvm_package.bat: Build teh clang-format plugin separately
Browse files Browse the repository at this point in the history
In r293373 we switched the build to linking dynamically against the
Universal CRT and include the redistributables in the installer.

However, clang-format.exe is copied into the vsix and needs to be
statically linked. This commit makes us build the plugin in a separate
step that uses static linking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294513 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zmodem committed Feb 8, 2017
1 parent ef1041f commit 4dcfb33
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion utils/release/build_llvm_package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,24 @@ mkdir build32
cd build32
set CC=..\build32_stage0\bin\clang-cl
set CXX=..\build32_stage0\bin\clang-cl
cmake -GNinja %cmake_flags% -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
ninja all || exit /b
ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || exit /b
copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangFormat.vsix ClangFormat-r%revision%.vsix
ninja package || exit /b
cd ..

REM The plug-in is built separately as it uses a statically linked clang-cl.exe.
mkdir build_vsix
cd build_vsix
set CC=..\build32_stage0\bin\clang-cl
set CXX=..\build32_stage0\bin\clang-cl
cmake -GNinja %cmake_flags% -DLLVM_USE_CRT_RELEASE=MT -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DPYTHON_HOME=%python32_dir% ..\llvm || exit /b
ninja clang_format_vsix || exit /b
copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangFormat.vsix ClangFormat-r%revision%.vsix
cd ..


call "%vcdir%/vcvarsall.bat" amd64
set CC=
Expand Down

0 comments on commit 4dcfb33

Please sign in to comment.