From 0968aa626788a1b948067a3ef39838f1617d5fb6 Mon Sep 17 00:00:00 2001 From: "Vladimir Gladkov (office-win10)" Date: Tue, 21 May 2019 11:25:01 +0800 Subject: [PATCH] fix: clang cmake flags did not have CRT flags --- set-env.bat | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/set-env.bat b/set-env.bat index 1fb1e5f..56153cf 100644 --- a/set-env.bat +++ b/set-env.bat @@ -129,12 +129,12 @@ set LLVM_DOWNLOAD_URL=http://releases.llvm.org/%LLVM_VERSION%/%LLVM_DOWNLOAD_FIL set LLVM_RELEASE_NAME=llvm-%LLVM_VERSION%-windows-%TARGET_CPU%-%TOOLCHAIN%-%CRT%%DEBUG_SUFFIX% set LLVM_RELEASE_FILE=%LLVM_RELEASE_NAME%.7z set LLVM_RELEASE_DIR=%APPVEYOR_BUILD_FOLDER%\%LLVM_RELEASE_NAME% +set LLVM_RELEASE_DIR=%LLVM_RELEASE_DIR:\=/% set LLVM_RELEASE_URL=https://github.com/vovkos/llvm-package-windows/releases/download/llvm-%LLVM_VERSION%/%LLVM_RELEASE_FILE% -set LLVM_INSTALL_PREFIX=%LLVM_RELEASE_DIR:\=/% set LLVM_CMAKE_CONFIGURE_FLAGS= ^ -G "%CMAKE_GENERATOR%%CMAKE_GENERATOR_SUFFIX%" ^ - -DCMAKE_INSTALL_PREFIX=%LLVM_INSTALL_PREFIX% ^ + -DCMAKE_INSTALL_PREFIX=%LLVM_RELEASE_DIR% ^ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=TRUE ^ -DLLVM_USE_CRT_DEBUG=%LLVM_CRT%d ^ -DLLVM_USE_CRT_RELEASE=%LLVM_CRT% ^ @@ -160,13 +160,16 @@ set CLANG_DOWNLOAD_URL=http://releases.llvm.org/%LLVM_VERSION%/%CLANG_DOWNLOAD_F set CLANG_RELEASE_NAME=clang-%LLVM_VERSION%-windows-%TARGET_CPU%-%TOOLCHAIN%-%CRT%%DEBUG_SUFFIX% set CLANG_RELEASE_FILE=%CLANG_RELEASE_NAME%.7z set CLANG_RELEASE_DIR=%APPVEYOR_BUILD_FOLDER%\%CLANG_RELEASE_NAME% -set CLANG_INSTALL_PREFIX=%CLANG_RELEASE_DIR:\=/% +set CLANG_RELEASE_DIR=%CLANG_RELEASE_DIR:\=/% set CLANG_CMAKE_CONFIGURE_FLAGS= ^ -G "%CMAKE_GENERATOR%%CMAKE_GENERATOR_SUFFIX%" ^ - -DCMAKE_INSTALL_PREFIX=%CLANG_INSTALL_PREFIX% ^ + -DCMAKE_INSTALL_PREFIX=%CLANG_RELEASE_DIR% ^ -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=TRUE ^ - -DLLVM_DIR=%LLVM_INSTALL_PREFIX%/lib/cmake/llvm ^ + -DLLVM_USE_CRT_DEBUG=%LLVM_CRT%d ^ + -DLLVM_USE_CRT_RELEASE=%LLVM_CRT% ^ + -DLLVM_USE_CRT_MINSIZEREL=%LLVM_CRT% ^ + -DLLVM_USE_CRT_RELWITHDEBINFO=%LLVM_CRT% ^ -DLLVM_INCLUDE_TESTS=OFF -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON ^ -DCLANG_INCLUDE_DOCS=OFF ^ @@ -183,11 +186,11 @@ if "%LLVM_VERSION%" lss "3.5.0" ( ) else if "%LLVM_VERSION%" lss "8.0.0" ( set CLANG_CMAKE_CONFIGURE_FLAGS= %CLANG_CMAKE_CONFIGURE_FLAGS% ^ - -DLLVM_CONFIG=$LLVM_RELEASE_DIR/bin/llvm-config + -DLLVM_CONFIG=%LLVM_RELEASE_DIR%/bin/llvm-config ) else ( set CLANG_CMAKE_CONFIGURE_FLAGS= ^ %CLANG_CMAKE_CONFIGURE_FLAGS% ^ - -DLLVM_DIR=$LLVM_RELEASE_DIR/lib/cmake/llvm + -DLLVM_DIR=%LLVM_RELEASE_DIR%/lib/cmake/llvm ) set CMAKE_BUILD_FLAGS= ^