[Lldb-commits] [lldb] r347057 - Use a shared module cache directory for LLDB.

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 16 08:19:08 PST 2018


Author: adrian
Date: Fri Nov 16 08:19:07 2018
New Revision: 347057

URL: http://llvm.org/viewvc/llvm-project?rev=347057&view=rev
Log:
Use a shared module cache directory for LLDB.

This saves about 3 redundant gigabytes from the Objective-C test build
directories. Tests that must do unsavory things with the LLDB clang
module cache, already specify a per-test module cache in their .py
test instructions.

<rdar://problem/36002081>

Differential Revision: https://reviews.llvm.org/D54602

Modified:
    lldb/trunk/lit/lit.cfg.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/lit/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.cfg.py?rev=347057&r1=347056&r2=347057&view=diff
==============================================================================
--- lldb/trunk/lit/lit.cfg.py (original)
+++ lldb/trunk/lit/lit.cfg.py Fri Nov 16 08:19:07 2018
@@ -128,7 +128,7 @@ llvm_config.feature_config(
 # Clean the module caches in the test build directory.  This is
 # necessary in an incremental build whenever clang changes underneath,
 # so doing it once per lit.py invocation is close enough.
-for i in ['module-cache-clang']:
+for i in ['module-cache-clang', 'module-cache-lldb']:
     cachedir = os.path.join(config.llvm_obj_root, 'lldb-test-build.noindex', i)
     if os.path.isdir(cachedir):
         print("Deleting module cache at %s."%cachedir)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=347057&r1=347056&r2=347057&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov 16 08:19:07 2018
@@ -1862,8 +1862,9 @@ class TestBase(Base):
         # decorators.
         Base.setUp(self)
 
-        # Set the clang modules cache path.
-        mod_cache = os.path.join(self.getBuildDir(), "module-cache-lldb")
+        # Set the clang modules cache path used by LLDB.
+        mod_cache = os.path.join(os.path.join(os.environ["LLDB_BUILD"],
+                                              "module-cache-lldb"))
         self.runCmd('settings set symbols.clang-modules-cache-path "%s"'
                     % mod_cache)
 




More information about the lldb-commits mailing list