Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
8734929
Remove release tests, add check for green commit (#898)
keith Sep 24, 2026
327ab4a
Rename INTERNAL_VISIBILITY to PUBLIC_IF_NOT_GOOGLE (#910)
armandomontanez Sep 29, 2026
1f56261
Fix cc_shared_library locations with rules_python on windows (#909)
keith Sep 30, 2026
2251f97
Use --remote_download_all on windows (#915)
keith Sep 30, 2026
f0a3fa7
Bump apple_support dep (#903)
keith Oct 1, 2026
59bedc6
Set coverage_files from rules based toolchains (#904)
keith Oct 1, 2026
20e8db3
Use dict.items() for artifact-label pairs (#900)
dzbarsky Oct 1, 2026
2e1b4ab
Starlarkify cc_common.empty_variables (#806)
dzbarsky Oct 1, 2026
785f33a
Support checking command-line copts in disallowed copts policies
a-googler Oct 1, 2026
958e6a1
Remove -std=c++17 from bazelrc (#918)
keith Oct 2, 2026
eaafbd3
Add back grep-includes alias (#888)
keith Oct 2, 2026
8e81232
Automatic code cleanup.
nglevin Oct 5, 2026
213bf55
Use named arguments instead of comments (#906)
keith Oct 5, 2026
1dfaf0b
Add docs for skip_virtual_includes (#920)
keith Oct 6, 2026
f96573d
Add a `dwo_files` output group to cc_binary and cc_test.
trybka Oct 9, 2026
9b9b7de
Keep tool paths of generated files relative to the execution root (#901)
fmeum Oct 9, 2026
770471b
Enable some more tests on macOS (#924)
keith Oct 12, 2026
14c3913
No public description
a-googler Oct 16, 2026
d1d1a95
Check disallowed copts before allowlist membership.
a-googler Oct 19, 2026
b50a797
Fix label resolution for external repos (#896)
fmeum Oct 20, 2026
ebd996f
Implement target allowlists in addition to package allowlists for dis…
a-googler Oct 20, 2026
f3daca7
Add --check_direct_dependencies=off to bazelrc (#917)
keith Oct 20, 2026
bf7ebfe
Apply cxx_flags to Windows module actions (#912)
PikachuHyA Oct 20, 2026
f6a743e
Update $(location to execpath (#891)
keith Oct 21, 2026
4d19de1
Fix cpp_modules + features=parse_headers/c=opt (#876)
rdong8 Oct 22, 2026
1197612
Exclude cpp_module_codegen from source_compile_actions (#897)
fmeum Oct 22, 2026
1bcbf51
Stop using deprecated aliases for rules_cc tools (#889)
keith Oct 23, 2026
9cb3e09
Add lilygorsheneva to BCR maintainers list (#956)
armandomontanez Oct 23, 2026
5323f49
Migrate C++ debug info packaging tests from Java to Starlark.
a-googler Oct 27, 2026
24f0847
Add Bazel 10 RC testing to BazelCI:rules_cc
pzembrod Oct 27, 2026
12f2354
Reenable coverage for windows_rolling on BazelCI:rules_cc
pzembrod Oct 27, 2026
cad4670
Fix windows binaries with spaces (#923)
keith Oct 27, 2026
cb13b25
Add rule-based args for C++20 modules (#927)
AustinSchuh Oct 28, 2026
b368e9c
Add linker directory -B flag when using lld or gold (#943)
pefoley2 Oct 28, 2026
df732a0
Starlarkify _cc_internal.create_cc_compile_action_template().
pzembrod Oct 28, 2026
d310c2a
Preserve LLVM coverage runtime object paths (#905)
gztong666 Oct 28, 2026
2ec2e09
Let integration tests reuse the pkg directory of earlier tests (#953)
chrisburr Oct 28, 2026
d16594b
Use the DLL's file name in the DEF file generated by cc_shared_librar…
fmeum Oct 28, 2026
2216264
Name MinGW DLLs `lib<name>.dll` (#951)
fmeum Oct 28, 2026
28acac0
Fallback to finding clang-scan-deps on PATH (#887)
keith Oct 28, 2026
45a967f
Avoid unnecessary versioned library checks in cc_helper (#871)
dzbarsky Oct 29, 2026
880db0a
Automated rollback of commit df732a095ddb6d552fcb8165468557922b08b8b3.
a-googler Oct 29, 2026
1448f8b
Add analysis tests for cc_shared_library DEF file DLL name generation.
pzembrod Oct 29, 2026
599653f
Avoid redundant `linker_inputs` depset flattening during `cc_binary` …
meisterT Oct 29, 2026
0726c5d
Fix cc_static_library opt mode duplicate archive symbols (#930)
jke-jumptrading Oct 29, 2026
bfb9321
No public description
zrlk Oct 30, 2026
2695f06
Automated rollback of commit 599653fd53e54daa13d800745bcb7fc8851a41b8.
a-googler Oct 30, 2026
ef8ed36
Minor fixes for documentation x-refs (#938)
sin-ack Oct 30, 2026
fc6b090
Validate extra link-time callbacks with Starlark Args (#827)
dzbarsky Nov 1, 2026
f042218
Use --ld-path= for the autoconfigured Clang linker (#935)
MaskRay Nov 2, 2026
c7c3941
Return the Unix linker path and compiler flags (#971)
tamird Nov 3, 2026
f3c5882
Don't resolve cc_configure template labels to paths (#944)
fmeum Nov 3, 2026
4356fd2
Fix bzl_library targets (#916)
keith Nov 3, 2026
36497c0
Use the public Bazel Features flag for the C++ compatibility proxy (#…
tamird Nov 3, 2026
a5affa2
Honor `disable_whole_archive_for_static_lib` in `cc_common.create_lib…
trybka Nov 4, 2026
4a09ba6
Fix multiline comment in cc:BUILD.
lilygorsheneva Nov 4, 2026
f876b28
Restrict the bzl visibilty of cc_internal to rules_cc itself.
c-mita Nov 10, 2026
ff9c023
cc_common: expose `per_file_copts` to `create_compile_action` callers.
zrlk Nov 11, 2026
275aeaf
Apply the rules-based compile args to C++20 module actions (#926)
AustinSchuh Nov 13, 2026
c100d5c
Replace a few macros with assignments (#945)
Ahajha Nov 14, 2026
b651728
Register apple_support's C++ toolchains (#984)
fmeum Nov 17, 2026
185faa3
Remove USE_STARLARK_SOLIB_SYMLINK and solib_symlink_action fallback i…
meisterT Nov 18, 2026
7afb85f
Cloned from CL 933771999 by 'g4 patch'.
Nov 18, 2026
df20f89
Allow `rules_swift/swift/internal` in `rules_cc` `PRIVATE_STARLARKIFI…
allevato Nov 18, 2026
06e5ea2
Fix rules_cc integration tests under Bazel@HEAD downstream CI
meteorcloudy Nov 19, 2026
9304de3
Define the C++ toolchain types in rules_cc (#979)
fmeum Nov 19, 2026
fb82cce
Enable linker parameter files for dynamic libraries that link depende…
jbcoe Nov 20, 2026
cb3cfb2
Use a dedicated `grep_includes` exec group on `cc_toolchain` for `gre…
cushon Nov 20, 2026
af07e54
Reject a missing required C++ toolchain (#949)
tamird Nov 20, 2026
49a5243
Describe C++ toolchain helpers and providers
tamird Oct 29, 2026
499a940
Check and distribute rules_cc type contracts
tamird Oct 29, 2026
137977b
Keep toolchain contracts beside their source
tamird Nov 3, 2026
eb77337
Move tool and repository types into source
tamird Nov 3, 2026
9726ba3
Document the type source for forwarded keywords
tamird Nov 3, 2026
f7b50c8
Explain the source annotation limits
tamird Nov 3, 2026
8c03c36
Reference sty by release tag
tamird Nov 3, 2026
77b942c
Select the strict sty rules as a group
tamird Nov 3, 2026
1659eaf
Check rules_cc against released Skylib
tamird Nov 3, 2026
2c2d835
Refresh sty and diagnostic names
tamird Nov 20, 2026
4a4d684
Use the rebased sty receiver checkpoint
tamird Nov 20, 2026
6640ec5
Use the current Starlark checker
tamird Nov 20, 2026
2d2a2f6
Update the Sty checker
tamird Nov 20, 2026
a5ec858
Update the Sty checker
tamird Nov 20, 2026
2cb902f
Refresh sty
tamird Nov 20, 2026
be53102
Update the Sty checker
tamird Nov 21, 2026
a8ab724
Update sty to c1f42d68
tamird Nov 21, 2026
a182352
Update sty to 43d26607
tamird Nov 21, 2026
3708156
Update sty to 14d05b98
tamird Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 47 additions & 7 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ tasks:
build_targets: *build_targets
test_targets: *test_targets
test_flags: *windows_test_flags
# TODO(pzembrod): reenable once Commit #53428ca hits Bazel ROLLING - should be within 08/2026
# coverage_flags: *windows_coverage_flags
# coverage_targets: *coverage_targets
coverage_flags: *windows_coverage_flags
coverage_targets: *coverage_targets

# Bazel 7
ubuntu_bazel_7:
Expand Down Expand Up @@ -230,15 +229,15 @@ tasks:
coverage_targets: *test_targets_bazel_less_than_9

# Bazel 9
ubuntu:
ubuntu_bazel_9:
name: Ubuntu (Bazel 9)
bazel: 9.x
platform: ubuntu2404
build_targets: *build_targets
test_targets: *test_targets
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
macos_intel:
macos_intel_bazel_9:
name: MacOS Intel (Bazel 9)
bazel: 9.x
platform: macos
Expand All @@ -247,7 +246,7 @@ tasks:
test_flags: *macos_test_flags
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
macos:
macos_bazel_9:
name: MacOS (Bazel 9)
bazel: 9.x
platform: macos_arm64
Expand All @@ -256,9 +255,50 @@ tasks:
test_flags: *macos_test_flags
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
windows:
windows_bazel_9:
name: Windows (Bazel 9)
bazel: 9.x
platform: windows
build_targets: *build_targets
test_targets: *test_targets
test_flags: *windows_test_flags
coverage_flags: *windows_coverage_flags
coverage_targets: *test_targets

# Bazel 10
ubuntu_bazel_10:
name: Ubuntu (Bazel 10)
bazel: 10.* # TODO(pzembrod): Change to 10.x after 10.0.0 is released. Same for other jobs.
platform: ubuntu2404
build_targets: *build_targets
test_targets: *test_targets
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
macos_intel_bazel_10:
name: MacOS Intel (Bazel 10)
bazel: 10.*
platform: macos
environment:
ANDROID_HOME: ""
ANDROID_NDK_HOME: ""
build_targets: *build_targets
test_targets: *test_targets
test_flags: *macos_test_flags
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
macos_bazel_10:
name: MacOS (Bazel 10)
bazel: 10.*
platform: macos_arm64
build_targets: *build_targets
test_targets: *test_targets
test_flags: *macos_test_flags
coverage_flags: *common_coverage_flags
coverage_targets: *coverage_targets
windows_bazel_10:
name: Windows (Bazel 10)
bazel: 10.*
platform: windows
build_targets: *build_targets
test_targets: *test_targets
test_flags: *windows_test_flags
Expand Down
8 changes: 6 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Required by googletest 1.17.
common --cxxopt=-std=c++17
common --enable_platform_specific_config
# TODO: Remove https://github.com/bazelbuild/bazel/pull/31423
common:windows --remote_download_all

common --check_direct_dependencies=off

test --test_env=PATH=/bin:/usr/bin:/usr/local/bin
5 changes: 5 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"email": "pzembrod@google.com",
"github": "pzembrod",
"name": "Philip Zembrod"
},
{
"email": "bgorshenev@google.com",
"github": "lilygorsheneva",
"name": "Lily Gorsheneva"
}
],
"versions": [],
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,29 @@ permissions:
attestations: write
contents: write
jobs:
check-commit-status:
name: Check commit status
runs-on: ubuntu-latest
permissions:
statuses: read
steps:
- name: Require a green commit
env:
GH_TOKEN: ${{ github.token }}
run: |
status="$(gh api \
--header "X-GitHub-Api-Version: 2022-11-28" \
"repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}/status" \
--jq '.state')"
if [[ "${status}" != "success" ]]; then
echo "::error::Commit ${GITHUB_SHA} is not green (combined status: ${status})."
exit 1
fi
release:
needs: check-commit-status
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3
with:
bazel_test_command: "true"
prerelease: false
release_files: rules_cc-*.tar.gz
tag_name: ${{ inputs.tag_name || github.ref_name }}
Expand Down
108 changes: 108 additions & 0 deletions .github/workflows/sty.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Starlark types

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
sty:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: tamird/sty@14d05b98238e2c0bf7773c81bbeb209861a7145b
with:
audit-loads: true
bazel-version: '9.3.0'
advisory-pathspecs: '*.bzl'
advisory-bazel-load-context: '@cross_repo_test//toolchain_include_dirs:toolchain_config'
advisory-require-bazel-load-context: tests/builtins_bzl/cc/cc_shared_library/test2/toolchain_include_dirs/cc_toolchain_config.bzl
files: |
@bazel_skylib//:bzl_library.bzl
@bazel_skylib//lib:paths.bzl
@bazel_skylib//rules:common_settings.bzl
@bazel_skylib//rules/directory:providers.bzl
cc/BUILD
cc/action_names.bzl
cc/cc_import.bzl
cc/cc_postmark.bzl
cc/cc_rules_extension_support.bzl
cc/cc_shared_library.bzl
cc/common/BUILD
cc/common/cc_shared_library_info.bzl
cc/common/debug_package_info.bzl
cc/common/feature_names.bzl
cc/common/objc_info.bzl
cc/extensions.bzl
cc/private/cc_shared_library_hint_info.bzl
cc/private/cc_shared_library_info.bzl
cc/private/debug_package_info.bzl
cc/private/graph_node_info.bzl
cc/private/paths.bzl
cc/private/rules_impl/failing_cc_proto_library.bzl
cc/private/rules_impl/fdo/fdo_prefetch_hints.bzl
cc/private/rules_impl/fdo/fdo_profile.bzl
cc/private/rules_impl/fdo/memprof_profile.bzl
cc/private/rules_impl/fdo/propeller_optimize.bzl
cc/private/rules_impl/native_cc_common.bzl
cc/private/rules_impl/objc_compilation_context_info.bzl
cc/private/toolchain/cc_configure.bzl
cc/private/toolchain/unix_cc_configure.bzl
cc/repositories.bzl
cc/starlark_doc_extract_helper.bzl
cc/system_library.bzl
cc/toolchains/actions.bzl
cc/toolchains/actions/BUILD
cc/toolchains/args/BUILD
cc/toolchains/args/libraries_to_link/private/library_link_args.bzl
cc/toolchains/args_list.bzl
cc/toolchains/artifacts.bzl
cc/toolchains/capabilities/BUILD
cc/toolchains/cc_toolchain.bzl
cc/toolchains/cc_toolchain_alias.bzl
cc/toolchains/cc_toolchain_config_info.bzl
cc/toolchains/directory_tool.bzl
cc/toolchains/fdo_prefetch_hints.bzl
cc/toolchains/fdo_profile.bzl
cc/toolchains/feature.bzl
cc/toolchains/feature_constraint.bzl
cc/toolchains/feature_injection.bzl
cc/toolchains/feature_set.bzl
cc/toolchains/features/BUILD
cc/toolchains/features/legacy/BUILD
cc/toolchains/impl/cc_artifact_category.bzl
cc/toolchains/impl/external_feature.bzl
cc/toolchains/impl/label_utils.bzl
cc/toolchains/impl/libc_version.bzl
cc/toolchains/impl/markdown_helpers.bzl
cc/toolchains/legacy_file_group.bzl
cc/toolchains/legacy_tool.bzl
cc/toolchains/make_variable.bzl
cc/toolchains/memprof_profile.bzl
cc/toolchains/mutually_exclusive_category.bzl
cc/toolchains/nested_args.bzl
cc/toolchains/propeller_optimize.bzl
cc/toolchains/providers.bzl
cc/toolchains/tool.bzl
cc/toolchains/tool_capability.bzl
cc/toolchains/variables/BUILD
cc/use_cc_toolchain.bzl
local_bazel.bzl
tests/cc/testutil/toolchains/additional_toolchains.bzl
tests/cc/testutil/toolchains/features.bzl
tests/load_from_macro/tags.bzl
tests/rule_based_toolchain/action_type_sets
tests/rule_based_toolchain/args/make_var_provider.bzl
tests/rule_based_toolchain/helpers.bzl
tests/rule_based_toolchain/legacy_features_as_args/goldens
tests/rule_based_toolchain/tool/execution_requirements.bzl
12 changes: 11 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//cc:cc_library.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

exports_files(["LICENSE"])
exports_files([
"LICENSE",
"stubs.toml",
])

exports_files(["copy.bara.sky"])

Expand Down Expand Up @@ -51,7 +55,13 @@ filegroup(
srcs = [
"BUILD",
"MODULE.bazel",
"stubs.toml",
"//cc:srcs",
],
visibility = ["//:__subpackages__"],
)

bzl_library(
name = "local_bazel",
srcs = ["local_bazel.bzl"],
)
12 changes: 7 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "apple_support", version = "2.8.0")
bazel_dep(name = "bazel_features", version = "1.50.0")
bazel_dep(name = "apple_support", version = "2.9.1")
bazel_dep(name = "bazel_features", version = "1.55.0")
bazel_dep(name = "bazel_skylib", version = "1.8.0")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf")

cc_configure = use_extension("//cc:extensions.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains")

apple_cc_configure = use_extension("@apple_support//crosstool:setup.bzl", "apple_cc_configure_extension")
use_repo(apple_cc_configure, "local_config_apple_cc_toolchains")

register_toolchains(
"@local_config_cc_toolchains//:all",
"@local_config_apple_cc_toolchains//:all",
"//cc/private/toolchain/test:default_test_runner_toolchain",
)

bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)

bazel_dep(name = "rules_python", version = "1.7.0")

bazel_dep(name = "rules_python", version = "2.0.0", dev_dependency = True)
bazel_dep(name = "googletest", version = "1.17.0", dev_dependency = True)
single_version_override(
module_name = "googletest",
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ http_archive(

http_archive(
name = "bazel_features",
sha256 = "5f7f87f50584df12bbfe5e461d358b16a8e15d245a7e596011bf39aaee5f58a9",
strip_prefix = "bazel_features-1.47.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.47.0/bazel_features-v1.47.0.tar.gz",
sha256 = "2ed1fdce7e51ba2149dfab73eab6e402217c8e27d17e1d4a48d4d86bdd9eaef6",
strip_prefix = "bazel_features-1.55.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.55.0/bazel_features-v1.55.0.tar.gz",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")
Expand Down
Loading
Loading