summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-07-24 15:49:29 +0000
committerPetr Hosek <phosek@chromium.org>2018-07-24 15:49:29 +0000
commit83f3cdc6a4e1033fb0f16f418c4b698b3030e29a (patch)
treecee5f7a45bb303ab2507eba6efcddaa1857306f0 /cmake
parent2be41bb90bc8613e4a2ae4fa5efe10b87c139e50 (diff)
downloadexternal_libcxx-83f3cdc6a4e1033fb0f16f418c4b698b3030e29a.tar.gz
external_libcxx-83f3cdc6a4e1033fb0f16f418c4b698b3030e29a.tar.bz2
external_libcxx-83f3cdc6a4e1033fb0f16f418c4b698b3030e29a.zip
[CMake] Fix the setting of LIBCXX_HEADER_DIR in standalone build
This is an alternative approach to r337727 which broke the build because libc++ headers were copied into the location outside of directories used by Clang. This change sets LIBCXX_HEADER_DIR to different values depending on whether libc++ is being built as part of LLVM w/ per-target multiarch runtime, LLVM or standalone. Differential Revision: https://reviews.llvm.org/D49711 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/HandleLibCXXABI.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
index d837c3c37..54b1e1286 100644
--- a/cmake/Modules/HandleLibCXXABI.cmake
+++ b/cmake/Modules/HandleLibCXXABI.cmake
@@ -48,12 +48,14 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
COMMENT "Copying C++ ABI header ${fpath}...")
list(APPEND abilib_headers "${dst}")
- set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}")
- add_custom_command(OUTPUT ${dst}
- DEPENDS ${src}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
- COMMENT "Copying C++ ABI header ${fpath}...")
- list(APPEND abilib_headers "${dst}")
+ if (NOT LIBCXX_USING_INSTALLED_LLVM)
+ set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}")
+ add_custom_command(OUTPUT ${dst}
+ DEPENDS ${src}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+ COMMENT "Copying C++ ABI header ${fpath}...")
+ list(APPEND abilib_headers "${dst}")
+ endif()
if (LIBCXX_INSTALL_HEADERS)
install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"