Repository navigation
Releases
0.2.28
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.28")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "0c51346fe5e7d2ee0b64a66623df0753bbb365877e6f85b8590e8de70448633e",
strip_prefix = "rules_cc-0.2.28",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.28/rules_cc-0.2.28.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
- Fix windows binaries with spaces (#923) by @keith in cad4670
- Preserve LLVM coverage runtime object paths (#905) by @gztong666 in d310c2a
- Use the DLL's file name in the DEF file generated by cc_shared_library (#950) by @fmeum in d16594b
- Fix cc_static_library opt mode duplicate archive symbols (#930) by @jke-jumptrading in 0726c5d
Default toolchain changes
- Add linker directory -B flag when using lld or gold (#943) by @pefoley2 in b368e9c
- Name MinGW DLLs
lib<name>.dll(#951) by @fmeum in 2216264 - Fallback to finding clang-scan-deps on PATH (#887) by @keith in 28acac0
- Use --ld-path= for the autoconfigured Clang linker (#935) by @MaskRay in f042218
Rules based toolchain changes
- Add rule-based args for C++20 modules (#927) by @AustinSchuh in cb13b25
Full Changelog: 0.2.27...0.2.28
0.2.27
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.27")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "6bcf1b46d9e629cbe4c96d7bfc56f61034c2193b7b16001201282ea50bef5d91",
strip_prefix = "rules_cc-0.2.27",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.27/rules_cc-0.2.27.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
- Add a
dwo_filesoutput group to cc_binary and cc_test. by @trybka in f96573d - Keep tool paths of generated files relative to the execution root (#901) by @fmeum in 9b9b7de
- Fix label resolution for external repos (#896) by @fmeum in b50a797
- Fix cpp_modules + features=parse_headers/c=opt (#876) by @rdong8 in 4d19de1
Default toolchain changes
- Apply cxx_flags to Windows module actions (#912) by @PikachuHyA in bf7ebfe
Rules based toolchain changes
Full Changelog: 0.2.26...0.2.27
0.2.26
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.26")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "44a8f325fa2b5cfb0ecaddda4365b3374eeefa1f97309fdb9301abb0897dfa7a",
strip_prefix = "rules_cc-0.2.26",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.26/rules_cc-0.2.26.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
Notable changes
- Split coverage features into
coverage_enabledandcoverage_instrumented(#842) by @fmeum in 8ab086b - Propagate the profile changelist when MemProf comes from an fdo_profile rule. by @a-googler in cd02576
- Use compiler_files_without_includes for CcLtoBackendCompile actions. by @djasper-gh in 33af48d
- Fix linkstamping in external repos (#840) by @tobias17 in aeab566
- Fix cc_shared_library dependencies being included in runfiles (#882) by @keith in b712795
- Fix cc_shared_library locations with rules_python on windows (#909) by @keith in 1f56261
- Support checking command-line copts in disallowed copts policies by @a-googler in 785f33a
- Add back grep-includes alias (#888) by @keith in eaafbd3
Rules based toolchain changes
Full Changelog: 0.2.25...0.2.26
0.2.25
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.25")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "bd7124a844d0403b4b353bcea34d6c8b2ba88dc26881c26c9ee668da89b71846",
strip_prefix = "rules_cc-0.2.25",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.25/rules_cc-0.2.25.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
Notable changes
- Throw an error if include attributes contain an absolute path instead of silently ignoring them. by @a-googler in c85b4d3
- Disable macOS toolchain by default (use apple_support instead) by @keith in 0c36f2b
- Allow 'includes = ["."]' in the root of the repo by @keith in 0d150d5
- Add //cc/libc config settings for C standard libraries (#792) by @fmeum in dc42405
- Add best effort toolchain feature docs by @keith in 2c27663
- Add loongarch64 support by @zhaixiaojuan in 5178408
- Support path mapping in CppLink IFF it's non-lto. by @lilygorsheneva in ad214a9
- Create features to enable/disable path mapping for CppLink. by @lilygorsheneva in ab613e1
- Add toolchain env + default env to dwp actions by @keith in d8eea5a
- Fix system_include_paths with textual_hdrs/hdrs and strip_include_prefix by @keith in db79849
- Expose Bazel cc rule functions for extension by @hvadehra in 6c6a87e
- Expand tree artifacts in textual_hdrs in generated module maps (#787) by @fmeum in 6cc1bf0
- Honor object extensions for ThinLTO merged artifacts (#853) by @cerisier in aff5441
- Expose a new API that copying from an existing library with overrides, so that callers don't need to know all internal attributes to avoid silently dropping some. by @a-googler in 14686ad
- Implement Starlark-level enforcement of disallowed compiler flags in copts, conlyopts, cxxopts. by @a-googler in f687cbc
- Move coverage script / flag to public package (#867) by @keith in 661b75d
- Support C++20 modules, GCC part by @PikachuHyA in faf2113
- Fix conflicting actions for C++20 modules info files in PIC/non-PIC b… (#834) by @PikachuHyA in 7b711b6
- Support C++20 modules, MSVC part (#836) by @PikachuHyA in de72c61
Default toolchain changes
- Add Clang -ftime-trace support to rules_cc (#772) by @PikachuHyA in 84cca09
- Make grep_includes a public attribute (#838) by @keith in bb9acd6
- Add -z origin to bsd linkopts (#855) by @keith in b1771c1
- Add missing bsd link libraries (#859) by @keith in 2c06f12
- Remove bsd support from unix_cc_configure (use bsd toolchain instead) (#860) by @keith in 813b9bd
- Fix VS2026 being passed an unsupported debug flag in -c fastbuild by @robinlinden in c7abbec
- Fix incorrect compiler type with
USE_CLANG_CLon windows. (#858) by @UebelAndre in 1d2e4cb - Pass fission flags to ThinLTO backend actions (#837) by @akonradi in 5bcfcf7
Rules based toolchain changes
- Support C++20 modules in the rules-based toolchain API by @fmeum in 0be22af
- Fix another case of tool_paths vs action configs by @keith in 736fa13
- Add
ACTION_NAMES.cpp_header_analysistoALL_CPP_COMPILE_ACTION_NAMES. by @anforowicz in 6c1531c - Default cc_sysroot data to sysroot if not passed (#875) by @keith in 3000380
Full Changelog: 0.2.22...0.2.25
0.2.22
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.22")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "81c10a95a5c22d838276ee90d712635d6042419fdfca5ef88328226b6321e53b",
strip_prefix = "rules_cc-0.2.22",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.22/rules_cc-0.2.22.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
Other notable changes
- Propagate cc_shared_library GraphStructureAspect to toolchains. by @lilygorsheneva in 840d532
- Fix kwargs handling in c++20 modules functions. by @lilygorsheneva in 0662ed2
Default toolchain changes
Rules based toolchain changes
Full Changelog: 0.2.21...0.2.22
0.2.21
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.21")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "962251923438d27fc030c2d9d35c058a7f7da4fed42c42ad5342c7b4403d4cf2",
strip_prefix = "rules_cc-0.2.21",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.21/rules_cc-0.2.21.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
New Features
- Support for adding runtimes-on-demand with
@bazel_tools//tools/cpp:cc_runtimes_toolchain_type. by @trybka in 5eeedeb
Default toolchain changes
- Remove
-mmacosx-version-minfrom default toolchain @nglevin in 2d10eba - Make default macOS toolchain respect the
use_libtoolflag by @dzbarsky in f2e4ad2
Rules based toolchain changes
Full Changelog: 0.2.20...0.2.21
0.2.20
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.20")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "69e05df29f0010ba248ef8dafc1f084c8fd2f5c553da634422d8167f5c4b277b",
strip_prefix = "rules_cc-0.2.20",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.20/rules_cc-0.2.20.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
Notable changes
- Add a dedicated exec group (
cpp_dwp) forCcGenerateDwpactions ofcc_binaryandcc_testtargets by @a-googler in 4c700e9 - [feat] add support for dwo_files in DebugPackageInfo on bazel 9 by @molar in 8edac4e
- Fix external_include_paths still using -iquote by @keith in c622263
- Add env var to disable macOS toolchain by @keith in 7eb96e3
- Add generated windows DEF file toolchain action by @cerisier in c9404cf
Default toolchain changes
- MSVC
determinismfeature should use/Breprowith linking by @b-spencer in 5751961 - Fix coverage with MacOS autoconf toolchains by @UebelAndre in d8bb310
- Add parse_headers_as_c feature by @keith in 8817d52
- Add llvm-profdata action, support env by @keith in a0d30c6
Rules based toolchain changes
- Add excludes to cc_action_type_set by @keith in 12c13bc
- Allow env requires_not_none on void variables by @cerisier in b1ef4d4
- add windows DEF linker args by @cerisier in 8b156de
Full Changelog: 0.2.19...0.2.20
0.2.19
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.19")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "351248f6be41d18694d4d7c390aaebd9f865eea72a4758b2c9d782ae744c97f4",
strip_prefix = "rules_cc-0.2.19",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.19/rules_cc-0.2.19.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()I curated the release notes for the latest release if someone can copy-paste them in to https://github.com/bazelbuild/rules_cc/releases/tag/0.2.19
What's Changed
New features
- Add action types for llvm-profdata and gcov by @keith in de6e35e
- Add local_defines to objc_library by @keith in 2310907
- Migrate objc.builtin_objc_strip_action to a build setting. by @a-googler in 804007d
- Add feature to _virtual_includes when paths are only stripped by @keith in 63790f3
- Add local_includes to cc_library / cc_binary by @keith in ab84bd3
Other notable changes
- Remove archive from objc_library runfiles. by @lilygorsheneva in d305b34
- Fix data on objc_library by @keith in c0baec3
- Fix data on cc_import by @keith in 6495bc3
- Fallback to get_tool_for_action with empty tool_paths by @keith in 3486c59
- Disable empty archive output. by @lilygorsheneva in 4733851
- Mark file paths in
formatfor path mapping by @fmeum in abf355c - fix: use depset instead of None by @kczulko in 6c78f0a
- Add .xll as a recognized C++ shared-library extension by @spektrof in 3aad82a
- Allow cc compilation actions to accept a user-defined comment. by @lilygorsheneva in 70158a9
Default toolchain changes
- Decouple supports_start_end_lib from lld / gold by @jwnimmer-tri in ccaae87
- Remove resolving clang symlink by @keith in f2587eb
- Remove /Z7 from default Windows fastbuild compile flags by @jmr in 06cda56
- Add best effort macOS reproducibility flags by @keith in 8e2b59a
- Add LSan feature to UNIX toolchain by @tyler-yankee in fcd960d
- Add a feature for the default C standard on Windows by @phst in 692a24a
Rules based toolchain changes
- Allow passing env to cc_tool @dzbarsky in d596465
- Pass through target_system_name by @keith in bf92fe4
- Add default objc_fully_link config by @keith in 39a97df
- Add cc_legacy_tool stopgap by @keith in 827e6a2
- Teach cc_args to interop with BuildSettingInfo by @dzbarsky in 12dda40
- Add set_soname feature to rules based toolchain by @keith in e09f3b9
- Set target_libc to macosx for Apple platforms by @keith in 21c8c40
- Allow using requires_none and requires_not_none at the same time by @keith in 8daf978
- Change rules based toolchain macOS conditions to Apple by @keith in 31f137f
- Add has_configured_linker_path cc_tool_capability by @keith in 01cc3d5
- Add sanitize_pwd feature for PWD overwriting by @keith in 59bad3f
- Pass through cpu to rules based toolchains by @keith in 7d32823
- Add support for toolchains in cc_args by @keith in 25ccb77
- Add more missing variables for objc_executable action by @keith in 9c98c34
- Support dynamic execution requirements with cc_tool by @keith in 577b55d
Full Changelog: 0.2.18...0.2.19
0.2.18
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.18")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "1de5b47721fce0af0dd453b3071228fdfc44bd18199826b3f0b03b423aae9f65",
strip_prefix = "rules_cc-0.2.18",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.18/rules_cc-0.2.18.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()I curated the release notes for the latest release if someone can copy-paste them in to https://github.com/bazelbuild/rules_cc/releases/tag/0.2.18
What's Changed
Notable changes
- Use root-relative path to derive the solib name by @fmeum in 3f10097
- Expose merge_cc_info from cc_info.bzl by @lilygorsheneva in 011d6d9
- fix copy_dynamic_libraries_to_binary for subdirectories by @novas0x2a in cdf9913
- Support env for validate_static_library by @dzbarsky in 748fbdf
- Migrate objc fragment options to starlark by @a-googler in 8a95356
- Add Starlark build setting for ObjcConfiguration.alwayslinkByDefault. by @a-googler in 0b29dfc
- Match library filename extensions case-insensitively in create_library_to_link by @Dragnalith in a8b81e9
- Make main_output public API by @keith in 170205b
- Make cc_library(alwayslink=True) apply to .a in srcs by @keith in 852869b
- Fix layering_check with path stripping and textual_hdrs by @keith in 8414b93
- Disable interface library -soname if already passed by @keith in f2cb3b4
- Fix interface library soname by @keith in 8956a5b
Default toolchain changes
- Fix clang version parsing on Windows. by @polasek in 333af1f
- external_include_paths feature: pass /external:W0 to VC++ by @phst in dd7100f
- Make Windows MSVC builds actually deterministic by @mochaaP in 94bda81
Rules based toolchain changes
- Add objc_compile to DEFAULT_SYSROOT_ACTIONS by @cerisier in 39e35dc
- Add some missing cc_variables for Apple platforms by @keith in f32fdf5
- [rule based toolchain] Move compile flags before compiler input flags by @cerisier in 128cf88
- Fix env var data substitutions by @keith in 1a5d8a3
- cc_toolchain's tool_map should be cfg-exec-configured by @dzbarsky in 0b11998
Full Changelog: 0.2.17...0.2.18
0.2.17
Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_cc", version = "0.2.17")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "283fa1cdaaf172337898749cf4b9b1ef5ea269da59540954e51fba0e7b8f277a",
strip_prefix = "rules_cc-0.2.17",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.17/rules_cc-0.2.17.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()What's Changed
Notable changes
Default toolchains
- Register both windows compilers to enable cross compilation by @AustinSchuh in 6dd2ef1
- Fix GCC detection to be robust to symlinks by @jwnimmer-tri in 20bf72d
- Add support to inject cc_feature into legacy toolchains by @limdor in 6402462
- Apply default compile flags passed as attrs in Windows MSVC toolchain config by @pikinier20 in 1de738e
- Silence warning with parse_headers by @keith in a464a75
- Fix empty flags errors by @keith in ae1df74
- Only pass profile-correction flag on GCC by @dzbarsky in 541eda5
Rules based toolchains
Full Changelog: 0.2.16...0.2.17