Add `sysroot_library` repository rule

Add the `sysroot_library` repository rule for importing existing libraries
from a Chrome OS sysroot into a Bazel workspace so that these libraries
can be used as regular `cc_import` dependencies by other Bazel targets.

The implementation of this repository rule is heavily based on the upstream
`system_library` repository rule [1] but adapted for Chrome OS to assume a
clang-based C toolchain and to respect sysroot settings for cross-compilation.

1: https://github.com/bazelbuild/rules_cc/blob/081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e/cc/system_library.bzl

BUG=b:213616502
TEST=None

Change-Id: Ic53092829e704d863870ed65fde80aa17a192be2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/rules_cros/+/3373721
1 file changed
tree: 619eca0f31bb26b0a8a607fee49d20a589ba2795
  1. cros/
  2. DIR_METADATA
  3. LICENSE
  4. OWNERS
  5. README.md
  6. WORKSPACE
README.md

Chrome OS Bazel Rules

Overview

This repository provides common rules and configuration for Bazel projects in Chrome OS.

Documentation

TODO