[Lldb-commits] [PATCH] D133024: [LLDB] Simplify cmake for instruction emulation unit tests

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 31 07:49:53 PDT 2022


DavidSpickett created this revision.
Herald added subscribers: luke957, s.egerton, simoncook, kristof.beyls, mgorny.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added subscribers: lldb-commits, pcwang-thead.
Herald added a project: LLDB.

I got suspicious because of checking "ARM" for an "ARM64" plugin.
As far as I can tell these never needed an llvm target to function.

Looking at the corresponding cmake for the libraries under test they
don't reference target libraries either.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133024

Files:
  lldb/unittests/Instruction/CMakeLists.txt


Index: lldb/unittests/Instruction/CMakeLists.txt
===================================================================
--- lldb/unittests/Instruction/CMakeLists.txt
+++ lldb/unittests/Instruction/CMakeLists.txt
@@ -1,29 +1,14 @@
-set(FILES "")
-set(DEPS "")
-
-if ("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
-  list(APPEND FILES ARM64/TestAArch64Emulator.cpp)
-  list(APPEND DEPS lldbPluginInstructionARM64)
-endif ()
-
-if ("RISCV" IN_LIST LLVM_TARGETS_TO_BUILD)
-  list(APPEND FILES RISCV/TestRISCVEmulator.cpp)
-  list(APPEND DEPS lldbPluginInstructionRISCV)
-endif ()
-
-list(LENGTH FILES LISTLEN)
-
-if (LISTLEN GREATER 0)
-  add_lldb_unittest(EmulatorTests
-    ${FILES}
-
-    LINK_LIBS
-      lldbCore
-      lldbSymbol
-      lldbTarget
-      ${DEPS}
-    LINK_COMPONENTS
-      Support
-      ${LLVM_TARGETS_TO_BUILD}
-    )
-endif ()
+add_lldb_unittest(EmulatorTests
+  ARM64/TestAArch64Emulator.cpp
+  RISCV/TestRISCVEmulator.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+    lldbPluginInstructionARM64
+    lldbPluginInstructionRISCV
+
+  LINK_COMPONENTS
+    Support
+  )
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133024.456960.patch
Type: text/x-patch
Size: 1127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220831/e3bc8e17/attachment.bin>


More information about the lldb-commits mailing list