system_library is a repository rule for safely depending on system-provided
libraries on Linux. It can be used with remote caching and remote execution.
Under the hood it uses gcc/clang for finding the library files and headers
and symlinks them into the build directory. Symlinking allows Bazel to take
these files into account when it calculates a checksum of the project.
This prevents cache poisoning from happening.
There are a couple of things that still need polishing:
Correct the include path for remote target
Implement obtaining exec_properties = {"container-image": "docker://gcr.io/...} from the platform for RBE
Modify cc_import to expose a way for adding system includes (-isystem instead of -iquote)
system_library
is a repository rule for safely depending on system-provided libraries on Linux. It can be used with remote caching and remote execution. Under the hood it uses gcc/clang for finding the library files and headers and symlinks them into the build directory. Symlinking allows Bazel to take these files into account when it calculates a checksum of the project. This prevents cache poisoning from happening.There are a couple of things that still need polishing:
exec_properties = {"container-image": "docker://gcr.io/...}
from the platform for RBE-isystem
instead of-iquote
)