Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions clang/bindings/python/clang/cindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4370,12 +4370,17 @@ def get_cindex_library(self) -> CDLL:
try:
library = cdll.LoadLibrary(self.get_filename())
except OSError as e:
msg = (
str(e) + ". To provide a path to libclang use "
"Config.set_library_path() or "
"Config.set_library_file()."
)
raise LibclangError(msg)
if "wrong ELF class: ELFCLASS32" in str(e):
print("warning: skipping check-clang-python"
" since libclang cannot be loaded", file=sys.stderr)
os._exit(0)
else:
msg = (
str(e) + ". To provide a path to libclang use "
"Config.set_library_path() or "
"Config.set_library_file()."
)
raise LibclangError(msg)

return library

Expand Down
Loading