From 96d8c6b571e696f520a054820d13872cdc17c793 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 31 Mar 2021 17:34:05 -0700 Subject: [PATCH] [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 --- libcxx/CMakeLists.txt | 3 --- libcxx/cmake/Modules/HandleLibCXXABI.cmake | 2 +- libcxx/docs/BuildingLibcxx.rst | 6 ------ libcxx/include/CMakeLists.txt | 4 ++-- libcxx/src/CMakeLists.txt | 20 ++++++++++---------- libcxxabi/CMakeLists.txt | 2 -- libcxxabi/src/CMakeLists.txt | 4 ++-- libunwind/CMakeLists.txt | 2 -- libunwind/src/CMakeLists.txt | 6 +++--- 9 files changed, 18 insertions(+), 31 deletions(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 036f39bd97c5..1621d37810aa 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -425,9 +425,6 @@ endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") -set(LIBCXX_INSTALL_PREFIX "" CACHE STRING "Define libc++ destination prefix.") -set(LIBCXX_INSTALL_HEADER_PREFIX "" CACHE STRING "Define libc++ header destination prefix.") - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake index fdd5c7ffe77d..987bb40b53ff 100644 --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake @@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs) if (LIBCXX_INSTALL_HEADERS) install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}" - DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir} + DESTINATION include/c++/v1/${dstdir} COMPONENT cxx-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst index bf80c6de5482..24e0a4cded17 100644 --- a/libcxx/docs/BuildingLibcxx.rst +++ b/libcxx/docs/BuildingLibcxx.rst @@ -235,12 +235,6 @@ libc++ specific options Extra suffix to append to the directory where libraries are to be installed. This option overrides `LLVM_LIBDIR_SUFFIX`. -.. option:: LIBCXX_INSTALL_PREFIX:STRING - - **Default**: ``""`` - - Define libc++ destination prefix. - .. option:: LIBCXX_HERMETIC_STATIC_LIBRARY:BOOL **Default**: ``OFF`` diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index daf504e09298..4c7fd862f5e6 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -219,7 +219,7 @@ if (LIBCXX_INSTALL_HEADERS) foreach(file ${files}) get_filename_component(dir ${file} DIRECTORY) install(FILES ${file} - DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir} + DESTINATION include/c++/v1/${dir} COMPONENT cxx-headers PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) @@ -227,7 +227,7 @@ if (LIBCXX_INSTALL_HEADERS) # Install the generated __config_site. install(FILES ${LIBCXX_GENERATED_INCLUDE_DIR}/__config_site - DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1 + DESTINATION include/c++/v1 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT cxx-headers) diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index 015f2a9e22a8..7568b391bbba 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -366,30 +366,30 @@ endif() if (LIBCXX_INSTALL_SHARED_LIBRARY) install(TARGETS cxx_shared - ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx) + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + RUNTIME DESTINATION bin COMPONENT cxx) endif() if (LIBCXX_INSTALL_STATIC_LIBRARY) install(TARGETS cxx_static - ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx) + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + RUNTIME DESTINATION bin COMPONENT cxx) endif() if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY) install(TARGETS cxx_experimental - LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx - RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx) + LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx + RUNTIME DESTINATION bin COMPONENT cxx) endif() # NOTE: This install command must go after the cxx install command otherwise # it will not be executed after the library symlinks are installed. if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT) install(FILES "$" - DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} + DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT libcxx) endif() diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index 2ffd8b611930..d54b1c5fa78e 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -211,8 +211,6 @@ else() set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX}) endif() -set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.") - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR}) diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 32a998e02f48..fbf9a10a73e5 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -311,8 +311,8 @@ add_custom_target(cxxabi DEPENDS ${LIBCXXABI_BUILD_TARGETS}) if (LIBCXXABI_INSTALL_LIBRARY) install(TARGETS ${LIBCXXABI_INSTALL_TARGETS} - LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi - ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi + LIBRARY DESTINATION ${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi + ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_LIBRARY_DIR} COMPONENT cxxabi ) endif() diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt index 628f0aaa0506..10c6b88d26a9 100644 --- a/libunwind/CMakeLists.txt +++ b/libunwind/CMakeLists.txt @@ -133,8 +133,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR}) -set(LIBUNWIND_INSTALL_PREFIX "" CACHE STRING "Define libunwind destination prefix.") - set(LIBUNWIND_C_FLAGS "") set(LIBUNWIND_CXX_FLAGS "") set(LIBUNWIND_COMPILE_FLAGS "") diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index f341b21e6016..03fd0fa459a0 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -182,9 +182,9 @@ add_custom_target(unwind DEPENDS ${LIBUNWIND_BUILD_TARGETS}) if (LIBUNWIND_INSTALL_LIBRARY) install(TARGETS ${LIBUNWIND_INSTALL_TARGETS} - LIBRARY DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind - ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind - RUNTIME DESTINATION ${LIBUNWIND_INSTALL_PREFIX}bin COMPONENT unwind) + LIBRARY DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind + ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_LIBRARY_DIR} COMPONENT unwind + RUNTIME DESTINATION bin COMPONENT unwind) endif() if (NOT CMAKE_CONFIGURATION_TYPES AND LIBUNWIND_INSTALL_LIBRARY)