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']
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']
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")