Author: rsmith Date: Wed Jan 4 20:55:10 2017 New Revision: 291065 URL: http://llvm.org/viewvc/llvm-project?rev=291065&view=rev Log: PR31540: install libc++abi headers into include/c++/v1 in build area.
This allows an in-build-area clang binary to find <cxxabi.h>. Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=291065&r1=291064&r2=291065&view=diff ============================================================================== --- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original) +++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Wed Jan 4 20:55:10 2017 @@ -10,7 +10,10 @@ # abidefines: A list of defines needed to compile libc++ with the ABI library # abilib : The ABI library to link against. # abifiles : A list of files (which may be relative paths) to copy into the -# libc++ build tree for the build. These files will also be +# libc++ build tree for the build. These files will be copied +# twice: once into include/, so the libc++ build itself can find +# them, and once into include/c++/v1, so that a clang built into +# the same build area will find them. These files will also be # installed alongside the libc++ headers. # abidirs : A list of relative paths to create under an include directory # in the libc++ build directory. @@ -31,8 +34,10 @@ macro(setup_abi_lib abidefines abilib ab # The place in the build tree where we store out-of-source headers. set(LIBCXX_BUILD_HEADERS_ROOT "${CMAKE_BINARY_DIR}/include/c++-build") file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}") + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1") foreach(_d ${abidirs}) file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}/${_d}") + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}") endforeach() foreach(fpath ${LIBCXX_ABILIB_FILES}) @@ -45,6 +50,9 @@ macro(setup_abi_lib abidefines abilib ab file(COPY "${incpath}/${fpath}" DESTINATION "${LIBCXX_BUILD_HEADERS_ROOT}/${dstdir}" ) + file(COPY "${incpath}/${fpath}" + DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}" + ) if (LIBCXX_INSTALL_HEADERS) install(FILES "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}" DESTINATION include/c++/v1/${dstdir} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits