Skip to content

configurable-bindgen-libcxx-dir-20221018_01

Choose a tag to compare

Enable specifying LD_LIBRARY_PATH for `libstdc++.so`.

Bindgen depends on `libclang` which depends on `libstdc++`. On Linux
systems, `rules_rust` uses the system-installed `libstdc++`. However,
this is an issue on outdated systems that have versions of `libstdc++`
that are tool old for Bindgen to use.

This is overcome by building a newer version of `libstdc++` shared
library on said systems, and updating `rules_rust` to enable specifying
`LD_LIBRARY_PATH` when a configuration setting is matched.

Signed-off-by: Timothy Trippel <ttrippel@google.com>