1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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.

llvm-svn: 294513
This commit is contained in:
Hans Wennborg 2017-02-08 20:58:33 +00:00
parent 3af3686b2e
commit 92fdc04010

View File

@ -70,7 +70,7 @@ mkdir build32
cd build32 cd build32
set CC=..\build32_stage0\bin\clang-cl set CC=..\build32_stage0\bin\clang-cl
set CXX=..\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 all || exit /b
ninja check || ninja check || ninja check || exit /b ninja check || ninja check || ninja check || exit /b
ninja check-clang || ninja check-clang || ninja check-clang || 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 ninja package || exit /b
cd .. 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 call "%vcdir%/vcvarsall.bat" amd64
set CC= set CC=