diff options
| author | Eric Fiselier <eric@efcs.ca> | 2015-10-14 19:00:35 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2015-10-14 19:00:35 +0000 |
| commit | f71de32d7b1c1595cce1e844d6dc4b80a6e44473 (patch) | |
| tree | 7cfc2a588eee66f0fdd7d35c047b24d0d73b3a9e | |
| parent | cc6ebb8e69e89219448303cf5d8049d0ef7fd549 (diff) | |
| download | bcm5719-llvm-f71de32d7b1c1595cce1e844d6dc4b80a6e44473.tar.gz bcm5719-llvm-f71de32d7b1c1595cce1e844d6dc4b80a6e44473.zip | |
Split out config_site logic so libc++abi can use it
llvm-svn: 250312
| -rw-r--r-- | libcxx/test/libcxx/test/config.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 419a86605b8..07e4bdc0074 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -414,18 +414,7 @@ class Configuration(object): support_path = os.path.join(self.libcxx_src_root, 'test/support') self.cxx.compile_flags += ['-I' + support_path] self.cxx.compile_flags += ['-include', os.path.join(support_path, 'nasty_macros.hpp')] - # Check for a possible __config_site in the build directory. We - # use this if it exists. - config_site_header = os.path.join(self.libcxx_obj_root, '__config_site') - if os.path.isfile(config_site_header): - contained_macros = self.parse_config_site_and_add_features( - config_site_header) - self.lit_config.note('Using __config_site header %s with macros: %r' - % (config_site_header, contained_macros)) - # FIXME: This must come after the call to - # 'parse_config_site_and_add_features(...)' in order for it to work. - self.cxx.compile_flags += ['-include', config_site_header] - + self.configure_config_site_header() libcxx_headers = self.get_lit_conf( 'libcxx_headers', os.path.join(self.libcxx_src_root, 'include')) if not os.path.isdir(libcxx_headers): @@ -433,6 +422,20 @@ class Configuration(object): % libcxx_headers) self.cxx.compile_flags += ['-I' + libcxx_headers] + def configure_config_site_header(self): + # Check for a possible __config_site in the build directory. We + # use this if it exists. + config_site_header = os.path.join(self.libcxx_obj_root, '__config_site') + if not os.path.isfile(config_site_header): + return + contained_macros = self.parse_config_site_and_add_features( + config_site_header) + self.lit_config.note('Using __config_site header %s with macros: %r' + % (config_site_header, contained_macros)) + # FIXME: This must come after the call to + # 'parse_config_site_and_add_features(...)' in order for it to work. + self.cxx.compile_flags += ['-include', config_site_header] + def parse_config_site_and_add_features(self, header): """ parse_config_site_and_add_features - Deduce and add the test features that that are implied by the #define's in the __config_site |

