diff options
| author | Eric Fiselier <eric@efcs.ca> | 2014-10-23 22:57:56 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2014-10-23 22:57:56 +0000 |
| commit | 460b224ef92fa71abb86fc5f20cc5a96d5efd73d (patch) | |
| tree | 254c4fa6a601bfa31b3c9b252e382f74cc3fbfc1 /libcxx | |
| parent | 7daf3b89f9e6d1661adc5a378934405b2a2427a9 (diff) | |
| download | bcm5719-llvm-460b224ef92fa71abb86fc5f20cc5a96d5efd73d.tar.gz bcm5719-llvm-460b224ef92fa71abb86fc5f20cc5a96d5efd73d.zip | |
Change uses of `sys.platform == 'linux2' to `sys.platform.startswith('linux')
Although the current method is valid up till python 3.3 (which is not supported)
this seems to be a clearer way of checking for linux and moves the tests towards
python 3 compatibility.
llvm-svn: 220534
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/test/lit.cfg | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg index 5e57cd6c1f5..d9d4152e4fc 100644 --- a/libcxx/test/lit.cfg +++ b/libcxx/test/lit.cfg @@ -367,7 +367,7 @@ class Configuration(object): # Configure extra compiler flags. self.compile_flags += ['-I' + self.src_root + '/include', '-I' + self.src_root + '/test/support'] - if sys.platform == 'linux2': + if sys.platform.startswith('linux'): self.compile_flags += ['-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS'] @@ -402,7 +402,7 @@ class Configuration(object): if sys.platform == 'darwin': self.link_flags += ['-lSystem'] - elif sys.platform == 'linux2': + elif sys.platform.startswith('linux'): self.link_flags += ['-lgcc_eh', '-lc', '-lm', '-lpthread', '-lrt', '-lgcc_s'] elif sys.platform.startswith('freebsd'): @@ -431,7 +431,7 @@ class Configuration(object): san = self.get_lit_conf('llvm_use_sanitizer', '').strip() if san: self.compile_flags += ['-fno-omit-frame-pointer'] - if sys.platform == 'linux2': + if sys.platform.startswith('linux'): self.link_flags += ['-ldl'] if san == 'Address': self.compile_flags += ['-fsanitize=address'] |

