-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[lldb] Combine disassembler gtest binaries for efficiency #133539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Each of these executables is 642MB for me locally with split DWARF, and we don't need 3 statically linked gtest binaries when one will do.
@llvm/pr-subscribers-lldb Author: Reid Kleckner (rnk) ChangesEach of these executables is 642MB for me locally with split DWARF, and we don't need 3 statically linked gtest binaries when one will do. Full diff: https://github.com/llvm/llvm-project/pull/133539.diff 4 Files Affected:
diff --git a/lldb/unittests/Disassembler/ARM/CMakeLists.txt b/lldb/unittests/Disassembler/ARM/CMakeLists.txt
deleted file mode 100644
index 91af06fa19d6f..0000000000000
--- a/lldb/unittests/Disassembler/ARM/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-add_lldb_unittest(DisassemblerTests
- TestArm64Disassembly.cpp
- TestArmv7Disassembly.cpp
- LINK_LIBS
- lldbCore
- lldbSymbol
- lldbTarget
- lldbPluginDisassemblerLLVMC
- lldbPluginProcessUtility
- LINK_COMPONENTS
- Support
- ${LLVM_TARGETS_TO_BUILD})
diff --git a/lldb/unittests/Disassembler/CMakeLists.txt b/lldb/unittests/Disassembler/CMakeLists.txt
index 208f1807427f4..4d443b69f29b1 100644
--- a/lldb/unittests/Disassembler/CMakeLists.txt
+++ b/lldb/unittests/Disassembler/CMakeLists.txt
@@ -1,11 +1,32 @@
+set(disas_srcs "")
+
if("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
- add_subdirectory(ARM)
+ set(disas_srcs ${disas_srcs}
+ ARM/TestArm64Disassembly.cpp
+ ARM/TestArmv7Disassembly.cpp
+ )
endif()
if("X86" IN_LIST LLVM_TARGETS_TO_BUILD)
- add_subdirectory(x86)
+ set(disas_srcs ${disas_srcs}
+ x86/TestGetControlFlowKindx86.cpp
+ )
endif()
if("RISCV" IN_LIST LLVM_TARGETS_TO_BUILD)
- add_subdirectory(RISCV)
+ set(disas_srcs ${disas_srcs}
+ RISCV/TestMCDisasmInstanceRISCV.cpp
+ )
endif()
+
+add_lldb_unittest(DisassemblerTests
+ ${disas_srcs}
+ LINK_LIBS
+ lldbCore
+ lldbSymbol
+ lldbTarget
+ lldbPluginDisassemblerLLVMC
+ lldbPluginProcessUtility
+ LINK_COMPONENTS
+ Support
+ ${LLVM_TARGETS_TO_BUILD})
diff --git a/lldb/unittests/Disassembler/RISCV/CMakeLists.txt b/lldb/unittests/Disassembler/RISCV/CMakeLists.txt
deleted file mode 100644
index 5bcc3e948335c..0000000000000
--- a/lldb/unittests/Disassembler/RISCV/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-add_lldb_unittest(MCDisasmInstanceRISCVTests
- TestMCDisasmInstanceRISCV.cpp
- LINK_LIBS
- lldbCore
- lldbSymbol
- lldbTarget
- lldbPluginDisassemblerLLVMC
- lldbPluginProcessUtility
- LINK_COMPONENTS
- Support
- ${LLVM_TARGETS_TO_BUILD}
- )
diff --git a/lldb/unittests/Disassembler/x86/CMakeLists.txt b/lldb/unittests/Disassembler/x86/CMakeLists.txt
deleted file mode 100644
index 31d84cf5d8365..0000000000000
--- a/lldb/unittests/Disassembler/x86/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-add_lldb_unittest(GetControlFlowKindx86Tests
- TestGetControlFlowKindx86.cpp
- LINK_LIBS
- lldbCore
- lldbSymbol
- lldbTarget
- lldbPluginDisassemblerLLVMC
- lldbPluginProcessUtility
- LINK_COMPONENTS
- Support
- ${LLVM_TARGETS_TO_BUILD}
- )
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor suggestion. Otherwise lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with Alex' suggestion.
Thanks! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/6919 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/3361 Here is the relevant piece of the build log for the reference
|
Each of these executables is 642MB for me locally with split DWARF, and we don't need 3 statically linked gtest binaries when one will do.
Each of these executables is 642MB for me locally with split DWARF, and we don't need 3 statically linked gtest binaries when one will do.