This example showcases a fully working rule-based toolchain for Linux. This also serves as an integration test to ensure rule-based toolchains continue to work as intended.
The complete toolchain configuration lives here.
From this directory, you can run example tests that build using this toolchain with the following command:
$ bazel test //...