Index: cmake/modules/HandleLLVMOptions.cmake =================================================================== --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -7,6 +7,11 @@ include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +# uppercase_CMAKE_BUILD_TYPE is used in this module but is defined in +# llvm/CMakeLists.txt. In order to allow for portible use of this module we +# redefine it. +string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) + if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)