[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #103552)

Vladimir Vereschaka via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 20:57:37 PDT 2024


https://github.com/vvereschaka created https://github.com/llvm/llvm-project/pull/103552

In order to build LLDB project added the following changes:

* enable LIBCXX_ENABLE_STATIC_ABI_LIBRARY option to merge the libc++ and libc++abi libraries int othe single file.
* set LIBCXX_ABI_VERSION to 1 by default.

>From 7376bf153141689227b5f7201a076dad2f96a336 Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
Date: Tue, 13 Aug 2024 20:52:56 -0700
Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cross
 toolchain builds. NFC.

In order to build LLDB project added the following changes:

* enable LIBCXX_ENABLE_STATIC_ABI_LIBRARY option to merge the libc++ and libc++abi
  libraries int othe single file.
* set LIBCXX_ABI_VERSION to 1 by default.
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake b/clang/cmake/caches/CrossWinToARMLinux.cmake
index e4d0a0c2d14cb9..87118bbd33377d 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -108,9 +108,9 @@ endif()
 
 message(STATUS "Toolchain target to build: ${LLVM_TARGETS_TO_BUILD}")
 
-# Allow to override libc++ ABI version. Use 2 by default.
+# Allow to override libc++ ABI version (1 is default).
 if (NOT DEFINED LIBCXX_ABI_VERSION)
-  set(LIBCXX_ABI_VERSION 2)
+  set(LIBCXX_ABI_VERSION 1)
 endif()
 
 message(STATUS "Toolchain's Libc++ ABI version: ${LIBCXX_ABI_VERSION}")
@@ -217,6 +217,8 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_SHARED
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ABI_VERSION                        ${LIBCXX_ABI_VERSION} CACHE STRING "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_CXX_ABI                            "libcxxabi" CACHE STRING "")    #!!!
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS      ON CACHE BOOL "")
+# Merge libc++ and libc++abi libraries into the single libc++ library file.
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY          ON CACHE BOOL "")
 
 # Avoid searching for the python3 interpreter during the runtimes configuration for the cross builds.
 # It starts searching the python3 package using the target's sysroot path, that usually is not compatible with the build host.



More information about the cfe-commits mailing list