[llvm] r294513 - build_llvm_package.bat: Build teh clang-format plugin separately

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 12:58:34 PST 2017


Author: hans
Date: Wed Feb  8 14:58:33 2017
New Revision: 294513

URL: http://llvm.org/viewvc/llvm-project?rev=294513&view=rev
Log:
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.

Modified:
    llvm/trunk/utils/release/build_llvm_package.bat

Modified: llvm/trunk/utils/release/build_llvm_package.bat
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/build_llvm_package.bat?rev=294513&r1=294512&r2=294513&view=diff
==============================================================================
--- llvm/trunk/utils/release/build_llvm_package.bat (original)
+++ llvm/trunk/utils/release/build_llvm_package.bat Wed Feb  8 14:58:33 2017
@@ -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-for
 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=




More information about the llvm-commits mailing list