Skip to content

Commit

Permalink
LLVM 3.7: Add new component mir
Browse files Browse the repository at this point in the history
  • Loading branch information
redstar committed May 22, 2015
1 parent 8d0fada commit f1c3c3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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})

#
Expand Down
6 changes: 4 additions & 2 deletions cmake/Modules/FindLLVM.cmake
Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down

2 comments on commit f1c3c3a

@kinke
Copy link
Member

@kinke kinke commented on f1c3c3a May 22, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That component isn't found on my Win64 VS15 box, even after building latest LLVM master. I can build LDC without it though.

@redstar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this patch was reverted. I do the same...

Please sign in to comment.