[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD
Zachary Turner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 22 13:51:36 PDT 2017
zturner requested changes to this revision.
zturner added a comment.
This revision now requires changes to proceed.
Please don't throw an exception here. Instead, write this as:
shlibpath_var = None
if platform.system() in ['Linux', 'FreeBSD', 'NetBSD']:
shilbpath = 'LD_LIBRARY_PATH'
elif platform.system() == 'Darwin':
shlibpath_var = 'DYLD_LIBRARY_PATH'
elif platform.system() == 'Windows':
shlibpath_var = 'PATH'
if shlibpath_var:
shlibpath = os.path.pathsep.join((config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var,'')))
config.environment[shlibpath_var] = shlibpath
else:
lit_config.warning('Unable to determine shared library path variable for platform {}'.format(platform.system()))
https://reviews.llvm.org/D39162
More information about the cfe-commits
mailing list