From: Hans Wennborg Date: Wed, 8 Feb 2017 20:58:33 +0000 (+0000) Subject: build_llvm_package.bat: Build teh clang-format plugin separately X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dcfb33dfab04259f22b5949642c43d9b399ba1d;p=llvm build_llvm_package.bat: Build teh clang-format plugin separately 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 --- diff --git a/utils/release/build_llvm_package.bat b/utils/release/build_llvm_package.bat index da968c84a8b..5e3f2ae6e54 100755 --- a/utils/release/build_llvm_package.bat +++ b/utils/release/build_llvm_package.bat @@ -70,7 +70,7 @@ 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 @@ -78,6 +78,16 @@ copy ..\llvm\tools\clang\tools\clang-format-vs\ClangFormat\bin\Release\ClangForm 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=