Skip to content

Commit b393480

Browse files
arichardsoncopybara-github
authored andcommitted
[libc++] Stop copying headers to the build directory (#115380)
This was needed before llvm/llvm-project#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. NOKEYCHECK=True GitOrigin-RevId: 428c8767ae997b0f726c0b40160ea8172551babf
1 parent cbada99 commit b393480

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ set(LIBCXXABI_STATIC_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the stat
9191

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

94-
if(LLVM_LIBRARY_OUTPUT_INTDIR)
95-
set(LIBCXXABI_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
96-
else()
97-
set(LIBCXXABI_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
98-
endif()
99-
10094
set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
10195
set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
10296
"Version of libc++abi. This will be reflected in the name of the shared \

include/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,7 @@ set(files
33
cxxabi.h
44
)
55

6-
foreach(f ${files})
7-
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
8-
set(dst "${LIBCXXABI_GENERATED_INCLUDE_DIR}/${f}")
9-
add_custom_command(OUTPUT ${dst}
10-
DEPENDS ${src}
11-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
12-
COMMENT "Copying CXXABI header ${f}")
13-
list(APPEND _all_includes "${dst}")
14-
endforeach()
15-
16-
add_custom_target(generate-cxxabi-headers ALL DEPENDS ${_all_includes})
17-
186
add_library(cxxabi-headers INTERFACE)
19-
add_dependencies(cxxabi-headers generate-cxxabi-headers)
207
target_include_directories(cxxabi-headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
218

229
if (LIBCXXABI_INSTALL_HEADERS)

0 commit comments

Comments
 (0)