[Lldb-commits] [PATCH] D146473: [lldb][CMake] Enforce not letting lldbUtility link against any other lldb libs
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 21 11:04:01 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2356bf27f722: [lldb][CMake] Enforce not letting lldbUtility link against any other lldb libs (authored by bulbazord).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146473/new/
https://reviews.llvm.org/D146473
Files:
lldb/cmake/modules/AddLLDB.cmake
lldb/source/Utility/CMakeLists.txt
Index: lldb/source/Utility/CMakeLists.txt
===================================================================
--- lldb/source/Utility/CMakeLists.txt
+++ lldb/source/Utility/CMakeLists.txt
@@ -23,7 +23,7 @@
list(APPEND LLDB_SYSTEM_LIBS atomic)
endif()
-add_lldb_library(lldbUtility
+add_lldb_library(lldbUtility NO_INTERNAL_DEPENDENCIES
ArchSpec.cpp
Args.cpp
Baton.cpp
Index: lldb/cmake/modules/AddLLDB.cmake
===================================================================
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -37,13 +37,23 @@
# only supported parameters to this macro are the optional
# MODULE;SHARED;STATIC library type and source files
cmake_parse_arguments(PARAM
- "MODULE;SHARED;STATIC;OBJECT;PLUGIN;FRAMEWORK"
+ "MODULE;SHARED;STATIC;OBJECT;PLUGIN;FRAMEWORK;NO_INTERNAL_DEPENDENCIES"
"INSTALL_PREFIX;ENTITLEMENTS"
"EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS;CLANG_LIBS"
${ARGN})
llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
list(APPEND LLVM_LINK_COMPONENTS ${PARAM_LINK_COMPONENTS})
+ if(PARAM_NO_INTERNAL_DEPENDENCIES)
+ foreach(link_lib ${PARAM_LINK_LIBS})
+ if (link_lib MATCHES "^lldb")
+ message(FATAL_ERROR
+ "Library ${name} cannot depend on any other lldb libs "
+ "(Found ${link_lib} in LINK_LIBS)")
+ endif()
+ endforeach()
+ endif()
+
if(PARAM_PLUGIN)
set_property(GLOBAL APPEND PROPERTY LLDB_PLUGINS ${name})
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146473.507055.patch
Type: text/x-patch
Size: 1503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230321/9476408e/attachment.bin>
More information about the lldb-commits
mailing list