[CMake] Don't install c++abi headers in standalone libc++ build

This is a refinement on r337833. Previously we were installing two
copies of c++abi headers in libc++ build directory, one in
include/c++build and another one in include/c++/v1. However, the
second copy is unnecessary when building libc++ standalone.

Differential Revision: https://reviews.llvm.org/D49752

llvm-svn: 337979
This commit is contained in:
Petr Hosek 2018-07-25 22:57:39 +00:00
parent ab4d730f14
commit 9d1bcc2a88
3 changed files with 2 additions and 3 deletions

View File

@ -407,7 +407,6 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}) set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
else() else()
set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
set(LIBCXX_HEADER_DIR ${CMAKE_BINARY_DIR})
endif() endif()
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")

View File

@ -48,7 +48,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
COMMENT "Copying C++ ABI header ${fpath}...") COMMENT "Copying C++ ABI header ${fpath}...")
list(APPEND abilib_headers "${dst}") list(APPEND abilib_headers "${dst}")
if (NOT LIBCXX_USING_INSTALLED_LLVM) if (NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR)
set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}") set(dst "${LIBCXX_HEADER_DIR}/include/c++/v1/${dstdir}/${fpath}")
add_custom_command(OUTPUT ${dst} add_custom_command(OUTPUT ${dst}
DEPENDS ${src} DEPENDS ${src}

View File

@ -205,7 +205,7 @@ else()
) )
endif() endif()
if(NOT LIBCXX_USING_INSTALLED_LLVM AND LLVM_BINARY_DIR) if(NOT LIBCXX_USING_INSTALLED_LLVM AND LIBCXX_HEADER_DIR)
set(output_dir ${LIBCXX_HEADER_DIR}/include/c++/v1) set(output_dir ${LIBCXX_HEADER_DIR}/include/c++/v1)
set(out_files) set(out_files)