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


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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to