[libcxxabi] r220535 - Change uses of `sys.platform == 'linux2' to `sys.platform.startswith('linux')
Eric Fiselier
eric at efcs.ca
Thu Oct 23 16:05:46 PDT 2014
Author: ericwf
Date: Thu Oct 23 18:05:46 2014
New Revision: 220535
URL: http://llvm.org/viewvc/llvm-project?rev=220535&view=rev
Log:
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.
Modified:
libcxxabi/trunk/test/lit.cfg
Modified: libcxxabi/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=220535&r1=220534&r2=220535&view=diff
==============================================================================
--- libcxxabi/trunk/test/lit.cfg (original)
+++ libcxxabi/trunk/test/lit.cfg Thu Oct 23 18:05:46 2014
@@ -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_sa
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")
More information about the cfe-commits
mailing list