diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake @@ -10,14 +10,6 @@ # abidefines: A list of defines needed to compile libc++ with the ABI library # abishared : The shared ABI library to link against. # abistatic : The static 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 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. # macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs) @@ -32,54 +24,6 @@ ) set(LIBCXX_CXX_SHARED_ABI_LIBRARY ${abishared}) set(LIBCXX_CXX_STATIC_ABI_LIBRARY ${abistatic}) - set(LIBCXX_ABILIB_FILES ${abifiles}) - - foreach(fpath ${LIBCXX_ABILIB_FILES}) - set(found FALSE) - foreach(incpath ${LIBCXX_CXX_ABI_INCLUDE_PATHS}) - message(STATUS "Looking for ${fpath} in ${incpath}") - if (EXISTS "${incpath}/${fpath}") - set(found TRUE) - message(STATUS "Looking for ${fpath} in ${incpath} - found") - get_filename_component(dstdir ${fpath} PATH) - get_filename_component(ifile ${fpath} NAME) - set(src ${incpath}/${fpath}) - - set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${ifile}) - 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}") - - # TODO: libc++ shouldn't be responsible for copying the libc++abi - # headers into the right location. - set(dst "${LIBCXX_GENERATED_INCLUDE_DIR}/${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 (LIBCXX_INSTALL_HEADERS) - install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}" - DESTINATION include/c++/v1/${dstdir} - COMPONENT cxx-headers - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - ) - endif() - else() - message(STATUS "Looking for ${fpath} in ${incpath} - not found") - endif() - endforeach() - if (NOT found) - message(WARNING "Failed to find ${fpath} in ${LIBCXX_CXX_ABI_INCLUDE_PATHS}") - endif() - endforeach() - - include_directories("${LIBCXX_BINARY_INCLUDE_DIR}") - add_custom_target(cxx_abi_headers ALL DEPENDS ${abilib_headers}) - set(LIBCXX_CXX_ABI_HEADER_TARGET "cxx_abi_headers") endmacro() diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -225,7 +225,7 @@ add_custom_target(generate-cxx-headers ALL DEPENDS ${_all_includes}) add_library(cxx-headers INTERFACE) -add_dependencies(cxx-headers generate-cxx-headers ${LIBCXX_CXX_ABI_HEADER_TARGET}) +add_dependencies(cxx-headers generate-cxx-headers) # TODO: Use target_include_directories once we figure out why that breaks the runtimes build if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") target_compile_options(cxx-headers INTERFACE /I "${LIBCXX_GENERATED_INCLUDE_DIR}") diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -172,10 +172,6 @@ endif() function(cxx_set_common_defines name) - if(LIBCXX_CXX_ABI_HEADER_TARGET) - add_dependencies(${name} ${LIBCXX_CXX_ABI_HEADER_TARGET}) - endif() - if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS) target_link_libraries(${name} PUBLIC pstl::ParallelSTL) endif() diff --git a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn --- a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn +++ b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn @@ -268,17 +268,6 @@ "wctype.h", ] deps = [ ":write_config_site" ] - if (target_os != "mac" && target_os != "win") { - # libcxx/cmake/Modules/HandleLibCXXABI.cmake sets - # LIBCXX_CXX_ABI_HEADER_TARGET if the libcxx abi library either of - # "libstdc++", "libsupc++", "libcxxabi", "libcxxrt", but not if it's "none", - # "default", or "vcruntime". So on Windows, these don't get copied due to - # LIBCXX_CXX_ABI_HEADER_TARGET not being set. - # On macOS, libcxx/CMakeLists.txt sets LIBCXX_CXX_ABI_SYSTEM to 1, which - # causes an empty header list to be passed to setup_abi_lib, so these - # don't get copied on macOS due to that. - deps += [ "//libcxxabi/include" ] - } outputs = [ "$root_build_dir/include/c++/v1/{{source_target_relative}}" ] } }