llvm.org GIT mirror llvm / 9ac47c5
explicit_map_components_to_libraries now does not complain when there is a dependence on an LLVM target that is not included on the build. When LLVM_TARGETS_TO_BUILD didn't include all the targets, the function emitted an error like "Library LLVMArmParser not found in list of llvm libraries." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110060 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 9 years ago
1 changed file(s) with 25 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1313 endif( NOT MSVC )
1414 set(${return_var} ${system_libs} PARENT_SCOPE)
1515 endfunction(get_system_libs)
16
17
18 function(is_llvm_target_library library return_var)
19 # Sets variable `return_var' to ON if `library' corresponds to a
20 # LLVM supported target. To OFF if it doesn't.
21 set(${return_var} OFF PARENT_SCOPE)
22 string(TOUPPER "${library}" capitalized_lib)
23 string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
24 foreach(t ${targets})
25 if( capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR
26 capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR
27 capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR
28 capitalized_lib STREQUAL "LLVM${t}INFO" )
29 set(${return_var} ON PARENT_SCOPE)
30 break()
31 endif()
32 endforeach()
33 endfunction(is_llvm_target_library)
1634
1735
1836 macro(llvm_config executable)
86104 string(TOUPPER "${c}" capitalized)
87105 list(FIND capitalized_libs ${capitalized} idx)
88106 if( idx LESS 0 )
89 message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
107 # The library is unkown. Maybe is an ommitted target?
108 is_llvm_target_library(${c} iltl_result)
109 if( iltl_result )
110 break()
111 else()
112 message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
113 endif()
90114 endif( idx LESS 0 )
91115 list(GET llvm_libs ${idx} canonical_lib)
92116 list(REMOVE_ITEM result ${canonical_lib})