rules_foreign_cc
0.12.0
published 3 months ago
679 stars
249 forks
32 watchers
Apache License 2.0
public
1 assets
2,078,299 downloads
273 KB
Compatability level 1
oub7VuZJwe55cD6ZqgydE8bMU8jXoMu4eXqyiIu8maM=
Maintained byJames Sharpe
0.12.0
August 14, 2024

Using Bzlmod with Bazel 6

  1. Enable with common --enable_bzlmod in .bazelrc.
  2. Add to your MODULE.bazel file:
bazel_dep(name = "rules_foreign_cc", version = "0.12.0")

Using WORKSPACE

Paste this snippet into your file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_foreign_cc",
    sha256 = "a2e6fb56e649c1ee79703e99aa0c9d13c6cc53c8d7a0cbb8797ab2888bbc99a3",
    strip_prefix = "rules_foreign_cc-0.12.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.12.0/rules_foreign_cc-0.12.0.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/0.12.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

What's Changed

New Contributors

Full Changelog: https://github.com/bazelbuild/rules_foreign_cc/compare/0.11.1...0.12.0

Deps:
Assets:

rules_foreign_cc

Build status

Rules for building C/C++ projects using foreign build systems inside Bazel projects.

This is not an officially supported Google product (meaning, support and/or new releases may be limited.)

Documentation

Documentation for all rules and providers are available at: https://bazel-contrib.github.io/rules_foreign_cc/

Bazel versions compatibility

Works with Bazel after 5.4.0.

Note that the rules may be compatible with older versions of Bazel but support may break in future changes as these older versions are not tested.

Note also that the runnable_binary macro requires bazel 5.4.0, for the rlocationpath path variable

News

For more generalized updates, please see NEWS.md or checkout the release notes of current or previous releases

Design document

External C/C++ libraries rules

Caveats

  • FreeBSD support is currently experimental and on a best-effort basis. Google currently doesn't have a CI test environment for FreeBSD, but please make your voice heard by upvoting this issue.