Skip to content

Commit

Permalink
fix: clang cmake flags did not have CRT flags
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkos committed May 21, 2019
1 parent ca8a064 commit 0968aa6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions set-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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% ^
Expand All @@ -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 ^
Expand All @@ -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= ^
Expand Down

0 comments on commit 0968aa6

Please sign in to comment.