This allows a user to set the explicit path to `libclang.so` in cases
where the file name doesn't match the default for the dynamic loader.
E.g.
```
LTTNG_UST_MPI_CLANG_LIBRARY_FILE=/path/to/libclang.so.16 make
```
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
# Require: python-clang (libclang)
import argparse
+import os
import re
from string import Template
def main():
+ if os.getenv("LTTNG_UST_MPI_CLANG_LIBRARY_FILE", None) is not None:
+ clang.cindex.Config.set_library_file(os.getenv("LTTNG_UST_MPI_CLANG_LIBRARY_FILE"))
+
parser = argparse.ArgumentParser(prog="lttng-ust-auto-mpi")
parser.add_argument("api",
global IGNORE
global PROVIDER
+ if os.getenv("LTTNG_UST_MPI_CLANG_LIBRARY_FILE", None) is not None:
+ clang.cindex.Config.set_library_file(os.getenv("LTTNG_UST_MPI_CLANG_LIBRARY_FILE"))
+
parser = argparse.ArgumentParser(prog="lttng-ust-autogen-api",
description="Generate LTTng classes and tracepoint definitions")