Skip to content

Commit

Permalink
Reapply "[libc++abi] Stop copying headers to the build directory"
Browse files Browse the repository at this point in the history
This was needed before #115077
since the compiler-rt test build made assumptions about the build
layout of libc++ and libc++abi, but now they link against a local
installation of these libraries so we no longer need this workaround.

The last attempt at landing this was reverted due to buildbot failures
which should be fixed by llvm/llvm-zorg#299.

Pull Request: #115379
  • Loading branch information
arichardson authored Nov 7, 2024
1 parent 53e49f1 commit fd799ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
6 changes: 0 additions & 6 deletions libcxxabi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ set(LIBCXXABI_STATIC_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the stat

set(LIBCXXABI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE STRING "Path to install the libc++abi headers at.")

if(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXXABI_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
else()
set(LIBCXXABI_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
endif()

set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
"Version of libc++abi. This will be reflected in the name of the shared \
Expand Down
13 changes: 0 additions & 13 deletions libcxxabi/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,7 @@ set(files
cxxabi.h
)

foreach(f ${files})
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
set(dst "${LIBCXXABI_GENERATED_INCLUDE_DIR}/${f}")
add_custom_command(OUTPUT ${dst}
DEPENDS ${src}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
COMMENT "Copying CXXABI header ${f}")
list(APPEND _all_includes "${dst}")
endforeach()

add_custom_target(generate-cxxabi-headers ALL DEPENDS ${_all_includes})

add_library(cxxabi-headers INTERFACE)
add_dependencies(cxxabi-headers generate-cxxabi-headers)
target_include_directories(cxxabi-headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")

if (LIBCXXABI_INSTALL_HEADERS)
Expand Down

0 comments on commit fd799ad

Please sign in to comment.