summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-07-28 19:25:44 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-07-28 19:25:44 +0000
commit9d7323eca38f6ad0722306713ab7c5df5cf43b38 (patch)
treef09dc624f023d3bd12e4ea5c4c6ef5d89c493bd5
parent51289892d27bf8921434c4376df5014aa436f002 (diff)
downloadbcm5719-llvm-9d7323eca38f6ad0722306713ab7c5df5cf43b38.tar.gz
bcm5719-llvm-9d7323eca38f6ad0722306713ab7c5df5cf43b38.zip
Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure that linker is able to locate just-built libc++abi in the build tree, instead of relying on "-lc++abi" linker flag. llvm-svn: 214114
-rw-r--r--libcxx/CMakeLists.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 1345eeff2ae..df8cc05314e 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -152,13 +152,16 @@ if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++" OR
"${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits"
)
elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi")
+ if (LIBCXX_CXX_ABI_INTREE)
+ # Link against just-built "cxxabi" target.
+ set(CXXABI_LIBNAME cxxabi)
+ else()
+ # Assume c++abi is installed in the system, rely on -lc++abi link flag.
+ set(CXXABI_LIBNAME "c++abi")
+ endif()
setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
- "c++abi" "cxxabi.h" ""
+ ${CXXABI_LIBNAME} "cxxabi.h" ""
)
-
- if (LIBCXX_CXX_ABI_INTREE)
- add_dependencies(LIBCXX_CXX_ABI_DEPS cxxabi)
- endif ()
elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"
"cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
OpenPOWER on IntegriCloud