Skip to content

Commit 96d8c6b

Browse files
committed
[CMake] Remove {LIBCXX,LIBCXXABI,LIBUNWIND}_INSTALL_PREFIX
These variables were introduced during early work on the runtimes build but were obsoleted by {LIBCXX,LIBCXXABI,LIBUNWIND}_INSTALL_LIBRARY_DIR. Differential Revision: https://reviews.llvm.org/D99697
1 parent 0ba0a73 commit 96d8c6b

File tree

9 files changed

+18
-31
lines changed

9 files changed

+18
-31
lines changed

libcxx/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,6 @@ endif()
425425

426426
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
427427

428-
set(LIBCXX_INSTALL_PREFIX "" CACHE STRING "Define libc++ destination prefix.")
429-
set(LIBCXX_INSTALL_HEADER_PREFIX "" CACHE STRING "Define libc++ header destination prefix.")
430-
431428
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
432429
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
433430
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})

libcxx/cmake/Modules/HandleLibCXXABI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
6363

6464
if (LIBCXX_INSTALL_HEADERS)
6565
install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
66-
DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
66+
DESTINATION include/c++/v1/${dstdir}
6767
COMPONENT cxx-headers
6868
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
6969
)

libcxx/docs/BuildingLibcxx.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,6 @@ libc++ specific options
235235
Extra suffix to append to the directory where libraries are to be installed.
236236
This option overrides `LLVM_LIBDIR_SUFFIX`.
237237

238-
.. option:: LIBCXX_INSTALL_PREFIX:STRING
239-
240-
**Default**: ``""``
241-
242-
Define libc++ destination prefix.
243-
244238
.. option:: LIBCXX_HERMETIC_STATIC_LIBRARY:BOOL
245239

246240
**Default**: ``OFF``

libcxx/include/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ if (LIBCXX_INSTALL_HEADERS)
219219
foreach(file ${files})
220220
get_filename_component(dir ${file} DIRECTORY)
221221
install(FILES ${file}
222-
DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
222+
DESTINATION include/c++/v1/${dir}
223223
COMPONENT cxx-headers
224224
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
225225
)
226226
endforeach()
227227

228228
# Install the generated __config_site.
229229
install(FILES ${LIBCXX_GENERATED_INCLUDE_DIR}/__config_site
230-
DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
230+
DESTINATION include/c++/v1
231231
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
232232
COMPONENT cxx-headers)
233233

libcxx/src/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,30 +366,30 @@ endif()
366366

367367
if (LIBCXX_INSTALL_SHARED_LIBRARY)
368368
install(TARGETS cxx_shared
369-
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
370-
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
371-
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
369+
ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
370+
LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
371+
RUNTIME DESTINATION bin COMPONENT cxx)
372372
endif()
373373

374374
if (LIBCXX_INSTALL_STATIC_LIBRARY)
375375
install(TARGETS cxx_static
376-
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
377-
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
378-
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
376+
ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
377+
LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
378+
RUNTIME DESTINATION bin COMPONENT cxx)
379379
endif()
380380

381381
if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
382382
install(TARGETS cxx_experimental
383-
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
384-
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
385-
RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
383+
LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
384+
ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
385+
RUNTIME DESTINATION bin COMPONENT cxx)
386386
endif()
387387

388388
# NOTE: This install command must go after the cxx install command otherwise
389389
# it will not be executed after the library symlinks are installed.
390390
if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
391391
install(FILES "$<TARGET_LINKER_FILE:cxx_shared>"
392-
DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR}
392+
DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR}
393393
COMPONENT libcxx)
394394
endif()
395395

libcxxabi/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ else()
211211
set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
212212
endif()
213213

214-
set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
215-
216214
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
217215
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
218216
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})

libcxxabi/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ add_custom_target(cxxabi DEPENDS ${LIBCXXABI_BUILD_TARGETS})
311311

312312
if (LIBCXXABI_INSTALL_LIBRARY)
313313
install(TARGETS ${LIBCXXABI_INSTALL_TARGETS}
314-
LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi
315-
ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi
314+
LIBRARY DESTINATION ${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi
315+
ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi
316316
)
317317
endif()
318318

libunwind/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
133133
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
134134
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
135135

136-
set(LIBUNWIND_INSTALL_PREFIX "" CACHE STRING "Define libunwind destination prefix.")
137-
138136
set(LIBUNWIND_C_FLAGS "")
139137
set(LIBUNWIND_CXX_FLAGS "")
140138
set(LIBUNWIND_COMPILE_FLAGS "")

libunwind/src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ add_custom_target(unwind DEPENDS ${LIBUNWIND_BUILD_TARGETS})
182182

183183
if (LIBUNWIND_INSTALL_LIBRARY)
184184
install(TARGETS ${LIBUNWIND_INSTALL_TARGETS}
185-
LIBRARY DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind
186-
ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind
187-
RUNTIME DESTINATION ${LIBUNWIND_INSTALL_PREFIX}bin COMPONENT unwind)
185+
LIBRARY DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind
186+
ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind
187+
RUNTIME DESTINATION bin COMPONENT unwind)
188188
endif()
189189

190190
if (NOT CMAKE_CONFIGURATION_TYPES AND LIBUNWIND_INSTALL_LIBRARY)

0 commit comments

Comments
 (0)