[libcxx-commits] [PATCH] D92131: [libc++] Attempt to fix spurious modules-related failures in the CI

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 26 09:00:22 PST 2020


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd7ca140c0122: [libc++] Attempt to fix spurious modules-related failures in the CI (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92131/new/

https://reviews.llvm.org/D92131

Files:
  libcxx/utils/libcxx/test/features.py


Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -40,7 +40,15 @@
   Feature(name='has-fobjc-arc',                 when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
                                                                  sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
   Feature(name='objective-c++',                 when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
-  Feature(name='modules-support',               when=lambda cfg: hasCompileFlag(cfg, '-fmodules')),
+
+  # Note: We use a custom modules cache path to make sure that we don't reuse
+  #       the default one, which can be shared across builds. This is important
+  #       because we define macros in headers files, and a change in these macros
+  #       doesn't seem to invalidate modules cache entries, which means we could
+  #       build against now-invalid cached headers from a previous build.
+  Feature(name='modules-support',
+          when=lambda cfg: hasCompileFlag(cfg, '-fmodules'),
+          actions=lambda cfg: [AddCompileFlag('-fmodules-cache-path=%t/ModuleCache')]),
 
   Feature(name='non-lockfree-atomics',
           when=lambda cfg: sourceBuilds(cfg, """


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92131.307889.patch
Type: text/x-patch
Size: 1405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201126/5a51daae/attachment.bin>


More information about the libcxx-commits mailing list