Skip to content

Commit 9ff462e

Browse files
committed
Fix the obtaining of path to libclang on macOS.
On macOS, the name of the library is 'libclang.dylin', not 'libclang.so'.
1 parent 60e2e94 commit 9ff462e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

regression_tests/clang.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import clang
88

99
from regression_tests.utils.os import on_windows
10+
from regression_tests.utils.os import on_macos
1011

1112

1213
#: Include paths.
@@ -23,6 +24,8 @@ def setup_clang_bindings(clang_dir):
2324
# Set a proper path to libclang so that the bindings can find them.
2425
if on_windows():
2526
libclang_file_path = os.path.join(clang_dir, 'bin', 'libclang.dll')
27+
elif on_macos():
28+
libclang_file_path = os.path.join(clang_dir, 'lib', 'libclang.dylib')
2629
else:
2730
libclang_file_path = os.path.join(clang_dir, 'lib', 'libclang.so')
2831
assert os.path.exists(libclang_file_path), '{}: no such file'.format(libclang_file_path)

0 commit comments

Comments
 (0)