diff options
author | Petr Hosek <phosek@chromium.org> | 2018-07-24 15:49:29 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-07-24 15:49:29 +0000 |
commit | f8f2a788f06ea811503dbf035b0de182e2700b04 (patch) | |
tree | a1ba51363b5377fc033d8a12160efcdf43b65ba2 /libcxx/cmake | |
parent | e03334cf6a65f8671b49ea82f4132ca9526ec521 (diff) | |
download | bcm5719-llvm-f8f2a788f06ea811503dbf035b0de182e2700b04.tar.gz bcm5719-llvm-f8f2a788f06ea811503dbf035b0de182e2700b04.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
llvm-svn: 337833
Diffstat (limited to 'libcxx/cmake')
-rw-r--r-- | libcxx/cmake/Modules/HandleLibCXXABI.cmake | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake index d837c3c3758..54b1e128617 100644 --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/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}" |