Skip to content

Commit dd93d65

Browse files
committed
doc: switch back to libclang to avoid hardcoding LLVM version
The libclang package has an embedded copy of libclang, which allows us to avoid requiring the system to have a particular clang version. This didn't work before because the lib_search_dirs logic in conf.py was clobbering a working path with a broken one. That logic is no longer needed, so just remove it.
1 parent 9bff18c commit dd93d65

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
clang <= 14
1+
libclang
22
hawkmoth
33
sphinx
44
sphinx_rtd_theme

doc/source/conf.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13-
from glob import glob
1413
import os
15-
import sys
1614
from hawkmoth.util import readthedocs
1715
from hawkmoth.util import compiler
18-
from clang.cindex import Config as clang_config
1916

2017
# -- Project information -----------------------------------------------------
2118

@@ -62,20 +59,3 @@
6259
hawkmoth_clang = compiler.get_include_args()
6360
# we need build to get version.h
6461
hawkmoth_clang.append(f"-I{os.path.abspath('../../build')}")
65-
if sys.platform == 'darwin':
66-
lib_search_dirs = [
67-
'/usr/lib',
68-
'/usr/local/lib',
69-
'/Library/Developer/CommandLineTools/usr/lib',
70-
]
71-
elif sys.platform == 'windows':
72-
lib_search_dirs = []
73-
else:
74-
# we are nailed to clang-14 by readthedocs, so we must look in llvm-14
75-
# for libclang.so
76-
lib_search_dirs = [
77-
'/usr/lib',
78-
'/usr/local/lib',
79-
] + glob('/usr/lib/llvm-14/lib')
80-
for lib_dir in lib_search_dirs:
81-
clang_config.set_library_path(lib_dir)

0 commit comments

Comments
 (0)