[libcxxabi][cmake] Account for LIBCXXABI_TARGET_SUBDIR in test config (#138527)
This makes the logic and code structure match that of libc++, which handles this case (i.e. the target subdirectory being changed). The `%{target}` substitution from libc++ is removed as libc++abi's config seems to be the only place it's used.
This commit is contained in:
parent
4403123728
commit
431507db52
@ -170,7 +170,6 @@ DEFAULT_PARAMETERS = [
|
|||||||
[
|
[
|
||||||
AddFeature("target={}".format(triple)),
|
AddFeature("target={}".format(triple)),
|
||||||
AddFlagIfSupported("--target={}".format(triple)),
|
AddFlagIfSupported("--target={}".format(triple)),
|
||||||
AddSubstitution("%{triple}", triple),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -192,6 +192,8 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
|||||||
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LIBCXXABI_TARGET_SUBDIR})
|
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LIBCXXABI_TARGET_SUBDIR})
|
||||||
set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LIBCXXABI_TARGET_SUBDIR} CACHE STRING
|
set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LIBCXXABI_TARGET_SUBDIR} CACHE STRING
|
||||||
"Path where built libc++abi libraries should be installed.")
|
"Path where built libc++abi libraries should be installed.")
|
||||||
|
set(LIBCXXABI_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LIBCXXABI_TARGET_SUBDIR}/c++/v1" CACHE STRING
|
||||||
|
"Path where target-specific libc++abi headers should be installed.")
|
||||||
unset(LIBCXXABI_TARGET_SUBDIR)
|
unset(LIBCXXABI_TARGET_SUBDIR)
|
||||||
else()
|
else()
|
||||||
if(LLVM_LIBRARY_OUTPUT_INTDIR)
|
if(LLVM_LIBRARY_OUTPUT_INTDIR)
|
||||||
@ -203,6 +205,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
|
set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
|
||||||
"Path where built libc++abi libraries should be installed.")
|
"Path where built libc++abi libraries should be installed.")
|
||||||
|
set(LIBCXXABI_INSTALL_INCLUDE_TARGET_DIR "${LIBCXXABI_INSTALL_INCLUDE_DIR}" CACHE STRING
|
||||||
|
"Path where target-specific libc++abi headers should be installed.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
|
||||||
|
@ -32,7 +32,7 @@ config.substitutions.append(('%{llvm}', '@LLVM_MAIN_SRC_DIR@'))
|
|||||||
config.substitutions.append(('%{install-prefix}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@'))
|
config.substitutions.append(('%{install-prefix}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@'))
|
||||||
config.substitutions.append(('%{include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include'))
|
config.substitutions.append(('%{include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include'))
|
||||||
config.substitutions.append(('%{cxx-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_DIR@'))
|
config.substitutions.append(('%{cxx-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_DIR@'))
|
||||||
config.substitutions.append(('%{cxx-target-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include/%{triple}/c++/v1'))
|
config.substitutions.append(('%{cxx-target-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_TARGET_DIR@'))
|
||||||
config.substitutions.append(('%{lib}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_LIBRARY_DIR@'))
|
config.substitutions.append(('%{lib}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_LIBRARY_DIR@'))
|
||||||
config.substitutions.append(('%{benchmark_flags}', ''))
|
config.substitutions.append(('%{benchmark_flags}', ''))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user