diff options
Diffstat (limited to 'libcxx/test/lit.cfg')
| -rw-r--r-- | libcxx/test/lit.cfg | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg index 8a6ff4154d4..edb0ab0d3cc 100644 --- a/libcxx/test/lit.cfg +++ b/libcxx/test/lit.cfg @@ -247,18 +247,6 @@ if libcxx_obj_root is None: if libcxx_obj_root is None: libcxx_obj_root = libcxx_src_root -cxx_has_stdcxx0x_flag_str = lit_config.params.get('cxx_has_stdcxx0x_flag', None) -if cxx_has_stdcxx0x_flag_str is not None: - if cxx_has_stdcxx0x_flag_str.lower() in ('1', 'true'): - cxx_has_stdcxx0x_flag = True - elif cxx_has_stdcxx0x_flag_str.lower() in ('', '0', 'false'): - cxx_has_stdcxx0x_flag = False - else: - lit_config.fatal( - 'user parameter cxx_has_stdcxx0x_flag_str should be 0 or 1') -else: - cxx_has_stdcxx0x_flag = getattr(config, 'cxx_has_stdcxx0x_flag', True) - # This test suite supports testing against either the system library or the # locally built one; the former mode is useful for testing ABI compatibility # between the current headers and a shipping dynamic library. @@ -313,8 +301,18 @@ include_paths = ['-I' + libcxx_src_root + '/include', '-I' + libcxx_src_root + '/test/support'] library_paths = ['-L' + libcxx_obj_root + '/lib'] compile_flags = [] -if cxx_has_stdcxx0x_flag: - compile_flags += ['-std=c++0x'] + +# Try and get the std version from the command line. Fall back to default given +# in lit.site.cfg is not present. If default is not present then force c++11. +std = lit_config.params.get('std', None) +if std is None: + std = getattr(config, 'std', None) + if std is None: + std = 'c++11' + lit_config.note('using default std: \'-std=c++11\'') +else: + lit_config.note('using user specified std: \'-std={}\''.format(std)) +compile_flags += ['-std={}'.format(std)] # Configure extra linker parameters. exec_env = {} |

