Merge pull request #78 from cblichmann:gen2-clang-path

PiperOrigin-RevId: 350524271
Change-Id: I46080c86c8e03f13a7468a73d752e968d5e9b56d
This commit is contained in:
Copybara-Service 2021-01-07 03:19:55 -08:00
commit 918a409126

View File

@ -40,11 +40,9 @@ def _init_libclang():
# Try to find libclang in the standard location and a few versioned paths
# that are used on Debian (and others). If LD_LIBRARY_PATH is set, it is
# used as well.
for lib in [
'clang', 'clang-9', 'clang-8', 'clang-7', 'clang-6.0', 'clang-5.0',
'clang-4.0'
]:
libclang = util.find_library(lib)
for version in ['', '12', '11', '10', '9', '8', '7', '6.0', '5.0', '4.0']:
libname = 'clang' + ('-' + version if version else '')
libclang = util.find_library(libname)
if libclang:
cindex.Config.set_library_file(libclang)
break