diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:10 +0000 |
commit | b276b1db48faa7328575ab722fe3bc340623f025 (patch) | |
tree | 9e4ba424f754c3f05e409ae647fa358031d97617 /utils | |
parent | d1bd27794dfbc317e27d1ec63b338115cbf194ba (diff) | |
download | src-test2-b276b1db48faa7328575ab722fe3bc340623f025.tar.gz src-test2-b276b1db48faa7328575ab722fe3bc340623f025.zip |
Notes
Diffstat (limited to 'utils')
-rw-r--r-- | utils/libcxx/test/config.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py index 2118f9c7eb90..1bf2677a8509 100644 --- a/utils/libcxx/test/config.py +++ b/utils/libcxx/test/config.py @@ -142,6 +142,7 @@ class Configuration(object): self.configure_sanitizer() self.configure_coverage() self.configure_modules() + self.configure_coroutines() self.configure_substitutions() self.configure_features() @@ -954,6 +955,18 @@ class Configuration(object): self.cxx.flags += ['-g', '--coverage'] self.cxx.compile_flags += ['-O0'] + def configure_coroutines(self): + if self.cxx.hasCompileFlag('-fcoroutines-ts'): + macros = self.cxx.dumpMacros(flags=['-fcoroutines-ts']) + if '__cpp_coroutines' not in macros: + self.lit_config.warning('-fcoroutines-ts is supported but ' + '__cpp_coroutines is not defined') + # Consider coroutines supported only when the feature test macro + # reflects a recent value. + val = macros['__cpp_coroutines'].replace('L', '') + if int(val) >= 201703: + self.config.available_features.add('fcoroutines-ts') + def configure_modules(self): modules_flags = ['-fmodules'] if platform.system() != 'Darwin': |