aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/LLVM-Config.cmake
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-12-01 14:51:49 -0800
committerStephen Hines <srhines@google.com>2014-12-02 16:08:10 -0800
commit37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch)
tree8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /cmake/modules/LLVM-Config.cmake
parentd2327b22152ced7bc46dc629fc908959e8a52d03 (diff)
downloadexternal_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip
external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz
external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'cmake/modules/LLVM-Config.cmake')
-rw-r--r--cmake/modules/LLVM-Config.cmake17
1 files changed, 14 insertions, 3 deletions
diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake
index 2783af8..e8c42fc 100644
--- a/cmake/modules/LLVM-Config.cmake
+++ b/cmake/modules/LLVM-Config.cmake
@@ -40,9 +40,9 @@ function(explicit_llvm_config executable)
llvm_map_components_to_libnames(LIBRARIES ${link_components})
get_target_property(t ${executable} TYPE)
- if("${t}" STREQUAL "STATIC_LIBRARY")
+ if("x${t}" STREQUAL "xSTATIC_LIBRARY")
target_link_libraries(${executable} ${cmake_2_8_12_INTERFACE} ${LIBRARIES})
- elseif("${t}" STREQUAL "SHARED_LIBRARY" OR "${t}" STREQUAL "MODULE_LIBRARY")
+ elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY")
target_link_libraries(${executable} ${cmake_2_8_12_PRIVATE} ${LIBRARIES})
else()
# Use plain form for legacy user.
@@ -51,12 +51,14 @@ function(explicit_llvm_config executable)
endfunction(explicit_llvm_config)
-# This is a variant intended for the final user:
+# This is Deprecated
function(llvm_map_components_to_libraries OUT_VAR)
+ message(AUTHOR_WARNING "Using llvm_map_components_to_libraries() is deprecated. Use llvm_map_components_to_libnames() instead")
explicit_map_components_to_libraries(result ${ARGN})
set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE )
endfunction(llvm_map_components_to_libraries)
+# This is a variant intended for the final user:
# Map LINK_COMPONENTS to actual libnames.
function(llvm_map_components_to_libnames out_libs)
set( link_components ${ARGN} )
@@ -105,6 +107,9 @@ function(llvm_map_components_to_libnames out_libs)
if( TARGET LLVM${c}AsmParser )
list(APPEND expanded_components "LLVM${c}AsmParser")
endif()
+ if( TARGET LLVM${c}Desc )
+ list(APPEND expanded_components "LLVM${c}Desc")
+ endif()
if( TARGET LLVM${c}Info )
list(APPEND expanded_components "LLVM${c}Info")
endif()
@@ -115,6 +120,12 @@ function(llvm_map_components_to_libnames out_libs)
# already processed
elseif( c STREQUAL "nativecodegen" )
list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+ if( TARGET LLVM${LLVM_NATIVE_ARCH}Desc )
+ list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}Desc")
+ endif()
+ if( TARGET LLVM${LLVM_NATIVE_ARCH}Info )
+ list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}Info")
+ endif()
elseif( c STREQUAL "backend" )
# same case as in `native'.
elseif( c STREQUAL "engine" )