diff options
| author | Eric Fiselier <eric@efcs.ca> | 2015-01-16 21:22:08 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2015-01-16 21:22:08 +0000 |
| commit | a745465ae4f51eed597ff3342a5e57fc990e16fb (patch) | |
| tree | 6e0a6173a0a516eae610f02ef51e5b375c0a4d52 /libcxx/test | |
| parent | bd350a5cd202bd9ae684f5403217cec23d2abd44 (diff) | |
| download | bcm5719-llvm-a745465ae4f51eed597ff3342a5e57fc990e16fb.tar.gz bcm5719-llvm-a745465ae4f51eed597ff3342a5e57fc990e16fb.zip | |
Add 'no_default_flags' option for turning off all default test compile and link flags.
When 'no_default_flags' is true only flags passed using '--param=compile_flags'
and '--param=link_flags' will be used when compiling the tests. This option
can be used to run the test suite against libstdc++ and helps with all
unusual test suite configurations.
NOTE: sanitizer flags are still added when '--param=use_sanitizer' is used even
if '--param=no_default_flags' is given.
llvm-svn: 226322
Diffstat (limited to 'libcxx/test')
| -rw-r--r-- | libcxx/test/libcxx/test/config.py | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 70af0df4492..e4d3b64f075 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -262,6 +262,14 @@ class Configuration(object): self.config.available_features.add('long_tests') def configure_compile_flags(self): + no_default_flags = self.get_lit_bool('no_default_flags', False) + if not no_default_flags: + self.configure_default_compile_flags() + # Configure extra flags + compile_flags_str = self.get_lit_conf('compile_flags', '') + self.compile_flags += shlex.split(compile_flags_str) + + def configure_default_compile_flags(self): # 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. @@ -294,10 +302,6 @@ class Configuration(object): ' enable_threads is true.') # Use verbose output for better errors self.compile_flags += ['-v'] - # Configure extra compile flags. - compile_flags_str = self.get_lit_conf('compile_flags', '') - self.compile_flags += shlex.split(compile_flags_str) - sysroot = self.get_lit_conf('sysroot') if sysroot: self.compile_flags += ['--sysroot', sysroot] @@ -339,16 +343,18 @@ class Configuration(object): self.config.available_features.add('libcpp-has-no-monotonic-clock') def configure_link_flags(self): - self.link_flags += ['-nodefaultlibs'] - - # Configure library path - self.configure_link_flags_cxx_library_path() - self.configure_link_flags_abi_library_path() - - # Configure libraries - self.configure_link_flags_cxx_library() - self.configure_link_flags_abi_library() - self.configure_extra_library_flags() + no_default_flags = self.get_lit_bool('no_default_flags', False) + if not no_default_flags: + self.link_flags += ['-nodefaultlibs'] + + # Configure library path + self.configure_link_flags_cxx_library_path() + self.configure_link_flags_abi_library_path() + + # Configure libraries + self.configure_link_flags_cxx_library() + self.configure_link_flags_abi_library() + self.configure_extra_library_flags() link_flags_str = self.get_lit_conf('link_flags', '') self.link_flags += shlex.split(link_flags_str) |

