From: Eric Fiselier Date: Tue, 6 Dec 2016 00:01:04 +0000 (+0000) Subject: Allow enabling/disabling testing with module using env LIBCXX_USE_MODULES=1 X-Git-Tag: llvmorg-4.0.0-rc1~2928 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e27c2b970f065033cc8c9eeecda480049d1edb5;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 288736 --- diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 849b163..f9ab22f 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -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')