[libcxx] r288736 - Allow enabling/disabling testing with module using env LIBCXX_USE_MODULES=1

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 16:01:05 PST 2016


Author: ericwf
Date: Mon Dec  5 18:01:04 2016
New Revision: 288736

URL: http://llvm.org/viewvc/llvm-project?rev=288736&view=rev
Log:
Allow enabling/disabling testing with module using env LIBCXX_USE_MODULES=1

The Clang modules implementation breaks enough that libc++ needs an easy way
to enable/disable using modules on the Zorg builders. Editing Zorg itself
requires a buildmaster restart which only happens weekly. This patch
allows LIBCXX_USE_MODULES to be used to enable/disable the feature,
allowing the buildslave to disable it as need be.

Modified:
    libcxx/trunk/test/libcxx/test/config.py

Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=288736&r1=288735&r2=288736&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Mon Dec  5 18:01:04 2016
@@ -736,7 +736,10 @@ class Configuration(object):
         if platform.system() != 'Darwin':
             modules_flags += ['-Xclang', '-fmodules-local-submodule-visibility']
         supports_modules = self.cxx.hasCompileFlag(modules_flags)
-        enable_modules = self.get_lit_bool('enable_modules', False)
+        enable_modules_default = supports_modules and \
+            os.environ.get('LIBCXX_USE_MODULES') is not None
+        enable_modules = self.get_lit_bool('enable_modules',
+                                           enable_modules_default)
         if enable_modules and not supports_modules:
             self.lit_config.fatal(
                 '-fmodules is enabled but not supported by the compiler')




More information about the cfe-commits mailing list