sandboxed-api/sandboxed_api/bazel
Christian Blichmann 74bb2c35ca bazel: Add build rules for the new interface generator
This adds a workspace rule that inspects the current system first and
downloads a suitable version of LLVM/Clang from GitHub if it can't
find one. In the latter case, the necessary parts are build from source,
which can take a while (~10-15m, depending on the build machine).

In order to be found, LLVM/Clang system libraries must be version 11
or higher. On Debian/Ubuntu, install `llvm-13-dev` and `libclang-13-dev`.

The new `llvm_config.bzl` implements this logic. It is loosely based on
upstream's https://github.com/llvm/llvm-project/blob/main/utils/bazel/configure.bzl.
Note that due to the way Bazel separates local repositories, we have to
duplictate some of this code.

PiperOrigin-RevId: 438759950
Change-Id: Ia65f473b4cdef6507e3816bf09794ea10963d87a
2022-04-01 00:55:30 -07:00
..
external Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
BUILD Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
build_defs.bzl Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
embed_data.bzl Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
llvm_config.bzl bazel: Add build rules for the new interface generator 2022-04-01 00:55:30 -07:00
proto.bzl Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
repositories.bzl Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
sapi_deps.bzl Change license link to HTTPS URL 2022-01-28 01:39:09 -08:00
sapi.bzl Introduce an API version to the build rules 2022-03-29 05:57:17 -07:00