Releases: bazel-contrib/rules_foreign_cc
0.5.0
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
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
attributesautoconf_env_vars
,autogen_env_vars
,autoreconf_env_vars
, andconfigure_env_vars
have been removed. Useenv
instead. - The
cmake
attributeenv_vars
has been removed, useenv
instead. - The common attribute
make_commands
has been removed. Instead, usetargets
andargs
which are available on each platform. With the addition oftool_prefix
and existence ofpostfix_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 fromcmake
andconfigure_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
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
toforeign_cc
- Update load paths
for_workspace
toforeign_cc
- Update loads of
workspace_definitions.bzl
toforeign_cc:repositories.bzl
- Migrate use of
keep_going
inmake
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
andmake
rules (#638) - Features
layering_check
,module_maps
, andthin_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
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
toforeign_cc
- Update load paths
for_workspace
toforeign_cc
- Update loads of
workspace_definitions.bzl
toforeign_cc:repositories.bzl
- Migrate use of
keep_going
inmake
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
andfor_workspace
and have been moved intoforeign_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 tocmake
. #539 - A new
targets
attribute was added to thecmake
,configure_make
, andmake
rules. This should be used overmake_commands
for building targets. #556 - The
make
rule no longer passes thePREFIX
argument as part of the default build command. #556 - The
keep_going
attribute (previously defaulted toTrue
) 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
toout_*_libs
. #538 - Downloaded CMake tools should now work on docker-sandbox / RBE #545
- The min supported version is raised from
3.4.0
to3.7.0
. #561
Known Issues
- The built make tool doesn't work on RBE.
0.1.0
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