diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-10-23 23:05:46 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-10-23 23:05:46 +0000 |
commit | 5a5fadd70d0979d076669e4bc9fe3f9192153ec7 (patch) | |
tree | b0d6d63e8f1d874dfc125bbc19746824203edcd0 /libcxxabi | |
parent | 460b224ef92fa71abb86fc5f20cc5a96d5efd73d (diff) | |
download | llvm-5a5fadd70d0979d076669e4bc9fe3f9192153ec7.zip llvm-5a5fadd70d0979d076669e4bc9fe3f9192153ec7.tar.gz llvm-5a5fadd70d0979d076669e4bc9fe3f9192153ec7.tar.bz2 |
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: 220535
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/test/lit.cfg | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxxabi/test/lit.cfg b/libcxxabi/test/lit.cfg index c2f2e33..f6efacf 100644 --- a/libcxxabi/test/lit.cfg +++ b/libcxxabi/test/lit.cfg @@ -201,7 +201,7 @@ if link_flags_str is None: link_flags += ['-lc++abi'] if sys.platform == 'darwin': link_flags += ['-lSystem'] - elif sys.platform == 'linux2': + elif sys.platform.startswith('linux'): if not llvm_unwinder: link_flags += ['-lgcc_eh'] link_flags += ['-lc', '-lm', '-lpthread'] @@ -227,7 +227,7 @@ san = lit_config.params.get('llvm_use_sanitizer', None) if san is None: san = getattr(config, 'llvm_use_sanitizer', None) if san: - if sys.platform == 'linux2': + if sys.platform.startswith('linux'): link_flags += ['-ldl'] if san == 'Address': compile_flags += ['-fsanitize=address'] @@ -251,7 +251,7 @@ if san: exec_env = {} if sys.platform == 'darwin': exec_env['DYLD_LIBRARY_PATH'] = os.path.join(libcxxabi_obj_root, 'lib') -elif sys.platform == 'linux2': +elif sys.platform.startswith('linux'): link_flags += ['-Wl,-R', libcxxabi_obj_root + '/lib'] else: lit_config.fatal("unrecognized system") |