[Lldb-commits] [PATCH] D64395: [CMake] Avoid libcxxabi dependency when building LLDB from the monorepo on macOS by default
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 9 03:41:45 PDT 2019
sgraenitz created this revision.
sgraenitz added reviewers: JDevlieghere, davide.
Herald added a subscriber: mgorny.
Herald added a reviewer: EricWF.
Herald added a project: LLDB.
libc++abi became mandatory to link the libc++ binaries. LLDB only needs the build artifacts and not the linked output (we don't ship libc++.dylib and/or libc++.a). Disable the respective link steps to avoid the dependency to libc++abi.
Commit 1665dd63466b <https://reviews.llvm.org/rG1665dd63466b6d284c75c3543e3fdb19314d752f> (SVN r365038) set the default in the Apple-lldb-base cache, but it would be good to have this even when not using the cache.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64395
Files:
lldb/cmake/modules/LLDBConfig.cmake
Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -73,6 +73,15 @@
endif()
endif()
+if(APPLE)
+ # Force-disable libc++ link steps to avoid the libc++abi dependency,
+ # if not enabled explicitly in builds from the monorepo.
+ if("libcxx" IN_LIST LLVM_ENABLE_PROJECTS AND NOT "libcxxabi" IN_LIST LLVM_ENABLE_PROJECTS)
+ set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "" FORCE)
+ set(LIBCXX_ENABLE_STATIC OFF CACHE BOOL "" FORCE)
+ endif()
+endif()
+
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL
"Causes lldb to export all symbols when building liblldb.")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64395.208629.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190709/bcb17ce7/attachment.bin>
More information about the lldb-commits
mailing list