customizable clang based tool to extract c++ code for input to language binding generators
docker build -t llvm-runtime .
Key components for secure container execution:
--user $(id -u):$(id -g)
- Preserves host system permissions by running as current user-v /tmp/llvm1:/app
- Maps local storage to container for persistent data
--security-opt=no-new-privileges
- Prevents privilege escalation within container--cap-drop=ALL
- Removes all Linux kernel capabilities, minimizing attack surface
-it
- Enables interactive terminal access (combines stdin and TTY allocation)
mkdir -p /tmp/llvm1
docker run -it --user $(id -u):$(id -g) -v /tmp/llvm1:/app --security-opt=no-new-privileges --cap-drop=ALL llvm-runtime --install /app
export PATH=$PATH:/tmp/llvm1/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/llvm1/lib
# You should now be be able to run clang and llvm tools
# Generate python bindings
# TODO:
# enter llvm-runtime container
# cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=/app
# ninja install