From f1c3c3a81febdaaea82728d0f0602aeb638ed6b4 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Fri, 22 May 2015 21:42:41 +0200 Subject: [PATCH] LLVM 3.7: Add new component mir --- CMakeLists.txt | 2 +- cmake/Modules/FindLLVM.cmake | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7444f5bc2e..65228dd2358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ include(CheckCXXCompilerFlag) # find_package(LLVM 3.1 REQUIRED - all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfodwarf instcombine ipa ipo instrumentation linker lto mc mcdisassembler mcparser objcarcopts object option profiledata scalaropts selectiondag support tablegen target transformutils vectorize ${EXTRA_LLVM_MODULES}) + all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfodwarf instcombine ipa ipo instrumentation linker lto mc mcdisassembler mcparser mir objcarcopts object option profiledata scalaropts selectiondag support tablegen target transformutils vectorize ${EXTRA_LLVM_MODULES}) math(EXPR LDC_LLVM_VER ${LLVM_VERSION_MAJOR}*100+${LLVM_VERSION_MINOR}) # diff --git a/cmake/Modules/FindLLVM.cmake b/cmake/Modules/FindLLVM.cmake index 2ad80fe87ff..22adcad9448 100644 --- a/cmake/Modules/FindLLVM.cmake +++ b/cmake/Modules/FindLLVM.cmake @@ -78,9 +78,10 @@ if ((WIN32 AND NOT(MINGW OR CYGWIN)) OR NOT LLVM_CONFIG) list(REMOVE_ITEM LLVM_FIND_COMPONENTS "profiledata" index) endif() if(${LLVM_VERSION_STRING} MATCHES "^3\\.[0-6][\\.0-9A-Za-z]*") - # Versions below 3.7 do not support components debuginfodwarf + # Versions below 3.7 do not support components debuginfodwarf, mir # Only debuginfo is available list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfodwarf" index) + list(REMOVE_ITEM LLVM_FIND_COMPONENTS "mir" index) list(APPEND LLVM_FIND_COMPONENTS "debuginfo") endif() @@ -158,9 +159,10 @@ else() list(REMOVE_ITEM LLVM_FIND_COMPONENTS "profiledata" index) endif() if(${LLVM_VERSION_STRING} MATCHES "^3\\.[0-6][\\.0-9A-Za-z]*") - # Versions below 3.7 do not support components debuginfodwarf + # Versions below 3.7 do not support components debuginfodwarf, mir # Only debuginfo is available list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfodwarf" index) + list(REMOVE_ITEM LLVM_FIND_COMPONENTS "mir" index) list(APPEND LLVM_FIND_COMPONENTS "debuginfo") endif()