diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -112,11 +112,6 @@ return check_value(val, env_var) return check_value(conf_val, name) - def get_modules_enabled(self): - return self.get_lit_bool('enable_modules', - default=False, - env_var='LIBCXX_ENABLE_MODULES') - def make_static_lib_name(self, name): """Return the full filename for the specified library name""" if self.is_windows: @@ -666,16 +661,14 @@ # FIXME: This is a hack that should be fixed using module maps (or something) # If modules are enabled then we have to lift all of the definitions # in __config_site onto the command line. - modules_enabled = self.get_modules_enabled() self.cxx.compile_flags += ['-Wno-macro-redefined'] # Transform each macro name into the feature name used in the tests. # Ex. _LIBCPP_HAS_NO_THREADS -> libcpp-has-no-threads for m in feature_macros: - if modules_enabled: - define = '-D%s' % m - if feature_macros[m]: - define += '=%s' % (feature_macros[m]) - self.cxx.compile_flags += [define] + define = '-D%s' % m + if feature_macros[m]: + define += '=%s' % (feature_macros[m]) + self.cxx.compile_flags += [define] if m == '_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS' or \ m == '_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT': continue @@ -1007,10 +1000,6 @@ if platform.system() != 'Darwin': modules_flags += ['-Xclang', '-fmodules-local-submodule-visibility'] supports_modules = self.cxx.hasCompileFlag(modules_flags) - enable_modules = self.get_modules_enabled() - if enable_modules and not supports_modules: - self.lit_config.fatal( - '-fmodules is enabled but not supported by the compiler') if not supports_modules: return self.config.available_features.add('modules-support') @@ -1022,9 +1011,8 @@ os.makedirs(module_cache) self.cxx.modules_flags = modules_flags + \ ['-fmodules-cache-path=' + module_cache] - if enable_modules: - self.config.available_features.add('-fmodules') - self.cxx.useModules() + self.config.available_features.add('-fmodules') + self.cxx.useModules() def configure_substitutions(self): sub = self.config.substitutions