Skip to content

0.2.0

Compare
Choose a tag to compare
@jsharpe jsharpe released this 20 Mar 16:02
· 347 commits to main since this release
d02390f

0.2.0

https://bazelbuild.github.io/rules_foreign_cc/0.2.0/

Usage

Add the following to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_foreign_cc",
    sha256 = "d54742ffbdc6924f222d2179f0e10e911c5c659c4ae74158e9fe827aad862ac6",
    strip_prefix = "rules_foreign_cc-0.2.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.2.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.2.0/#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

Migration Instructions

Existing code should continue to work but the following migrations should be made to ensure future compatibility with these rules:

  • Update load paths containing tools/build_defs to foreign_cc
  • Update load paths for_workspace to foreign_cc
  • Update loads of workspace_definitions.bzl to foreign_cc:repositories.bzl
  • Migrate use of keep_going in make targets to explicitly pass -k or patch the Makefile so that it doesn't require the keep going behaviour.

Release Notes

  • @rules_foreign_cc//foreign_cc:defs.bzl was introduced and contains all common build rules. #555
  • Symbols in tools/build_defs and for_workspace and have been moved into foreign_cc. Users should update their load statements to use the new paths. #555 #557
  • Toolchain definitions are now located in toolchains. #541
  • The cmake_external rule has been renamed to cmake. #539
  • A new targets attribute was added to the cmake, configure_make, and make rules. This should be used over make_commands for building targets. #556
  • The make rule no longer passes the PREFIX argument as part of the default build command. #556
  • The keep_going attribute (previously defaulted to True) is deprecated, users can maintain this behavior by passing -k themselves. #556
  • Logs from built tools are now written to a file and only printed to the terminal when the target fails to build. #559
  • Output attributes on common rules have been renamed from *_libraries to out_*_libs. #538
  • Downloaded CMake tools should now work on docker-sandbox / RBE #545
  • The min supported version is raised from 3.4.0 to 3.7.0. #561

Known Issues

  • The built make tool doesn't work on RBE.