Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - 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
- Re-export runfiles env vars so that dependencies can use them by @mishazharov in #1235
- Apply expand_locations_and_make_variables to cache_entries by @froody in #1240
- Revert "Apply expand_locations_and_make_variables to cache_entries" by @jsharpe in #1250
- Fix macOS CI by @jsharpe in #1251
- Upgrade default ninja version to 1.12.1 by @jsharpe in #1248
- Add setup_args and run
meson setup
explictly by @allsey87 in #1223 - Portable copy_dir_contents_to_dir by @lamcw in #1246
- Do not clobber user environment variables in Meson script by @allsey87 in #1255
- runnable_binary: use package_relative_label by @lamcw in #1253
- configure_make: support autotools cross-compilation by @novas0x2a in #1247
- cmake: handle builds that use static toolchain libs by @novas0x2a in #1256
- Fix
_get_make_variables
ignoring user environment variables by @allsey87 in #1230 - add support for cc_shared_library deps by @matt-sm in #1243
- autotools: return darwin as os instead of cmake in xcompile by @novas0x2a in #1258
- Update BCR presubmit by @jsharpe in #1259
- fix meson tests for macOS CI by @jsun-splunk in #1260
- Merge user provided CPPFLAGS with build system CPPFLAGS by @allsey87 in #1261
New Contributors
- @froody made their first contribution in #1240
- @allsey87 made their first contribution in #1223
- @lamcw made their first contribution in #1246
Full Changelog: 0.11.1...0.12.0