[Lldb-commits] [PATCH] D132868: [lldb][test] Enable clang modules in API/tools/lldb-server (NFC)
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 29 10:18:28 PDT 2022
kastiglione created this revision.
kastiglione added reviewers: JDevlieghere, mib, jasonmolenda.
Herald added a project: All.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
While investigating slow tests, I noticed that `TestLldbGdbServer.py` (and
other tests) have slow compile times for the targets they build to test with.
This change speeds up `TestLldbGdbServer.py` by enabling clang modules for the
compilation. After seeing that compilation was slow, I ran with `-ftime-trace`
and saw that a significant amount of compilation time was spent parsing
`iostream` and other libc++ headers.
On my machine, this reduces `TestLldbGdbServer.py` from:
Before:
> Ran 84 tests in 223.308s
After:
> Ran 84 tests in 131.672s
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132868
Files:
lldb/test/API/tools/lldb-server/Makefile
Index: lldb/test/API/tools/lldb-server/Makefile
===================================================================
--- lldb/test/API/tools/lldb-server/Makefile
+++ lldb/test/API/tools/lldb-server/Makefile
@@ -1,6 +1,7 @@
CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
-MAKE_DSYM :=NO
+MAKE_DSYM := NO
+CXXFLAGS_EXTRAS := -fmodules -fcxx-modules -fmodules-cache-path=$(THE_CLANG_MODULE_CACHE_DIR)
include Makefile.rules
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132868.456397.patch
Type: text/x-patch
Size: 487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220829/ec78d71d/attachment.bin>
More information about the lldb-commits
mailing list