Skip to content

Releases: bazel-contrib/rules_foreign_cc

0.5.0

29 Jul 14:32
5accf6c
Compare
Choose a tag to compare

0.5.0

https://bazelbuild.github.io/rules_foreign_cc/0.5.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 = "ed8068eea78cdccb8a638b3b4b49dd333db01ec83879f3fcd460cc8b6aeaa0c6",
    strip_prefix = "rules_foreign_cc-0.5.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.5.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.5.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

Contributors

This release had contributions from 5 authors.
Thanks to @jheaff1, @jsharpe, @UebelAndre, @al-tu, & @philwo for their contributions to this release.

Migration Instructions

No migrations needed since 0.4.0.

Release Notes

  • Fix quoting of toolchain flags passed to cmake (#703)
  • Add <rule>_variant macros (#734)
  • Prepend user-specified PATH to existing PATH (#733)
  • Convert MSVC flags by replacing slashes with dashes (#731)
  • Fixed issues with paths to tools containing spaces (#732)
  • Added cmake 3.21.0 and older 3.X versions of cmake (#726, #698)
  • Added Gnu make built tool toolchain for windows (#716)
  • Updated progress message for all rules (#697, #744)
  • Added copts attribute to core ForeignCc rules.

0.4.0

22 Jun 20:13
a7f1c9e
Compare
Choose a tag to compare

0.4.0

https://bazelbuild.github.io/rules_foreign_cc/0.4.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 = "e14a159c452a68a97a7c59fa458033cc91edb8224516295b047a95555140af5f",
    strip_prefix = "rules_foreign_cc-0.4.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.4.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.4.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

Contributors

This release had contributions from 5 authors.
Thanks to @UebelAndre, @jheaff1, @attilaolah, @al-tu, & @alexeagle for their contributions to this release.

Migration Instructions

  • The configure_make attributes autoconf_env_vars, autogen_env_vars, autoreconf_env_vars, and configure_env_vars have been removed. Use env instead.
  • The cmake attribute env_vars has been removed, use env instead.
  • The common attribute make_commands has been removed. Instead, use targets and args which are available on each platform. With the addition of tool_prefix and existence of postfix_script we're able to cover all known use cases.

Release Notes

  • Provide out_data_dirs attribute (#419) (#622)
  • Updated macos install behavior to be more consistent with other platforms (#687)
  • Removed legacy *env_vars attributes from cmake and configure_make rule (#675)
  • Removed make_commands attribute and fixed configure_make (#671)
  • update cmake to 3.20.4 (#680)
  • Added support for replacing sandbox paths in build artifacts (#650)
  • Added tool_prefix attribute (#676)

0.3.0

02 Jun 19:56
eb72705
Compare
Choose a tag to compare

0.3.0

https://bazelbuild.github.io/rules_foreign_cc/0.3.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 = "b263601a377dc2e7b255670928c98dcd21ed8fcc69a6cfe7be8b550ef7f9de07",
    strip_prefix = "rules_foreign_cc-0.3.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.3.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.3.0/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

Contributors

This release had contributions from 10 authors.
Thanks to @UebelAndre, @illicitonion, @jsharpe, @djmarcin, @jheaff1, @wolfd, @tsawada, @sam-lunt, @alexeagle & @thekyz for their contributions to this release.

Migration Instructions

The migration instructions are the same as those of 0.2.0 except for this release they are mandatory as the deprecated functions have been removed:

  • 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

  • Added CMake versions 3.20.2, 3.20.1, 3.20.0 & 3.19.7 (#636) (#605) (#587)
  • Various fixes to permissions / copying logic to ensure that input files aren't modified, allowing use of --spawn_strategy=standalone (#603) (#646) (#656) (#583)
  • Set MAKE env var for the "make" binary used in configure_make and make rules (#638)
  • Features layering_check, module_maps, and thin_lto are disabled from being passed to the external build system (#631)
  • Add --action_env support to MacOS and unify environment variables across platforms (except Windows). (#647)
  • Built Make toolchains can now be used in RBE (#548)

Known Issues

  • Building CMake from sources requires a host installed version of make.

0.2.0

20 Mar 16:02
d02390f
Compare
Choose a tag to compare

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.

0.1.0

01 Mar 23:01
1222c48
Compare
Choose a tag to compare

0.1.0

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

Note this will be the last release to be tested on Bazel 3.4.0. All releases going forward will be tested on 4.0.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 = "c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e",
    strip_prefix = "rules_foreign_cc-0.1.0",
    url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.1.0.zip",
)

load("@rules_foreign_cc//:workspace_definitions.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.1.0/#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()

Note that this release will default to using a downloaded version of cmake and ninja. If you want to revert to the previous behaviour of using the host installed version call use rules_foreign_cc_dependencies(register_default_tools = False) in your WORKSPACE file. The use of the host installed tools can be disabled using the register_preinstalled_tools argument.

Release Notes

  • Added repository rules for downloading prebuilt versions of cmake and ninja rather than relying on system installed tools.

  • Added native ninja build rule

  • Now builds under the bazel sandbox rather than in /tmp

  • Tidied up the structure of the examples directory

  • Deprecated the old rules install_ws_dependency and cc_configure_make

  • Autogenerated documentation was added