Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazelbuild/rules_cc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.20
Choose a base ref
...
head repository: bazelbuild/rules_cc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.2.21
Choose a head ref
  • 20 commits
  • 40 files changed
  • 8 contributors

Commits on Jun 23, 2026

  1. No public description

    PiperOrigin-RevId: 936808182
    Change-Id: Iaef0f1c75d9df3fde061985b664d398f80231746
    nglevin authored and copybara-github committed Jun 23, 2026
    Configuration menu
    Copy the full SHA
    2d10eba View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2026

  1. Add unit tests for ThinLTO linking.

    Verify that thin_lto feature is propagated correctly and generates expected actions (CppLTOIndexing, CcLtoBackendCompile).
    
    PiperOrigin-RevId: 937170237
    Change-Id: I8d579119e98f928fe6c9cebe761e6f2a7fb4bb27
    Googler authored and copybara-github committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    26224b0 View commit details
    Browse the repository at this point in the history
  2. Migrate batch 1 of CcBinaryThinLtoTest to Starlark

    Migrated tests:
    - testActionGraph
    - testLinkshared
    - testNoLinkstatic
    - testLtoBackendEnv
    - testFission
    - testNoLinkstaticFission
    - testLinkstaticCcTestFission
    
    PiperOrigin-RevId: 937187362
    Change-Id: Ia2b3d17e59e00748f20ee1c9463ead0f9e465dfe
    Googler authored and copybara-github committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    e8acaca View commit details
    Browse the repository at this point in the history
  3. Migrate batch 2 of CcBinaryThinLtoTest to Starlark

    Migrated tests:
    - testLinkstaticCcTest
    - testTestOnlyTarget
    - testUseSharedAllLinkstatic
    - testAssemblerSource
    - testNoSourceFiles
    - testFdoInstrument
    
    PiperOrigin-RevId: 937202153
    Change-Id: I2d064af55e1caf52436a1f0bdf1717485b7b30e7
    Googler authored and copybara-github committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    5817cb2 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2026

  1. Set ANDROID_HOME and ANDROID_NDK_HOME to empty strings for MacOS Inte…

    …l presubmit.
    
    This ensures that Bazel does not attempt to locate Android SDK/NDK on the MacOS presubmit workers, avoiding potential build failures related to Android toolchain resolution.
    
    PiperOrigin-RevId: 938486612
    Change-Id: I01292d6ef96ef06a9d3ad28a534cc44fa4f7053a
    pzembrod authored and copybara-github committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    e091134 View commit details
    Browse the repository at this point in the history
  2. migrate CcCommon tests for start_end_lib and temps to Starlark.

    PiperOrigin-RevId: 938501847
    Change-Id: I000d59a66d81d4090cd1e1a40e3834113213f0de
    pzembrod authored and copybara-github committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    e30bbe5 View commit details
    Browse the repository at this point in the history
  3. Pass FDO and Memprof profile changelist metadata to compile actions

    The change extracts FDO and Memprof profile changelists to populate build variables and configures the toolchain to pass them as compilation flags when active. Verified end-to-end integration by running aquery on a mock cc_binary target.
    
    PiperOrigin-RevId: 938512174
    Change-Id: I97ad4d4759356a0882668e3a4ae660bbebc29e4b
    Googler authored and copybara-github committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    9cff17d View commit details
    Browse the repository at this point in the history
  4. Migrate batch 1 of LinkBuildVariablesTest to Starlark

    Migrated tests:
    - testForcePicBuildVariable
    - testLibrariesToLinkAreExported
    - testLibrarySearchDirectoriesAreExported
    - testLinkSimpleLibName
    - testLinkVersionedLibName
    - testLinkUnusualLibName
    
    PiperOrigin-RevId: 938659951
    Change-Id: I221ab9d7127b71365f2eb59a94a2d572a5d1f55e
    Googler authored and copybara-github committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    79ee749 View commit details
    Browse the repository at this point in the history
  5. Migrate batch 2 of LinkBuildVariablesTest to Starlark

    Migrated tests:
    - testInterfaceLibraryBuildingVariablesWhenLegacyGenerationPossible
    - testInterfaceLibraryBuildingVariablesWhenGenerationPossible
    - testInterfaceLibraryBuildingVariablesWhenGenerationNotAllowed
    - testNoIfsoBuildingWhenWhenThinLtoIndexing
    
    PiperOrigin-RevId: 938670252
    Change-Id: I2e08b542cd5db6003e5b3cf261192c31391459a8
    Googler authored and copybara-github committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    69561f1 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2026

  1. Automatic code cleanup.

    PiperOrigin-RevId: 939884047
    Change-Id: Idbb9df339324413ed711deae0880b6e104bb3330
    nglevin authored and copybara-github committed Jun 29, 2026
    Configuration menu
    Copy the full SHA
    bb34d22 View commit details
    Browse the repository at this point in the history
  2. Migrate batch 3 of CcBinaryThinLtoTest to Starlark

    Migrated tests:
    - testLtoIndexOpt
    - testLtoStandaloneCommandLines
    - testCopt
    - testPerFileCopt
    - testLtoBackendOpt
    - testPerFileLtoBackendOpt
    - testLinkOpt
    
    PiperOrigin-RevId: 939911684
    Change-Id: Ic5c7919edf9b858f718bf8ed89313e9a2bf9714f
    Googler authored and copybara-github committed Jun 29, 2026
    Configuration menu
    Copy the full SHA
    a7a6249 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2026

  1. Make default OSX toolchain respect the use_libtool flag

    Copybara Import from #736
    
    BEGIN_PUBLIC
    Make default OSX toolchain respect the use_libtool flag (#736)
    
    Closes #736
    END_PUBLIC
    
    COPYBARA_INTEGRATE_REVIEW=#736 from dzbarsky:zbarsky/libtool 465c64a
    PiperOrigin-RevId: 940195996
    Change-Id: Id0754fc7d9da5254bee7e535fd3d68d17d7bd171
    dzbarsky authored and copybara-github committed Jun 30, 2026
    Configuration menu
    Copy the full SHA
    f2e4ad2 View commit details
    Browse the repository at this point in the history
  2. Remove --incompatible_make_thinlto_command_lines_standalone from `t…

    …est_lto_standalone_command_lines`.
    
    This had broken //tests/cc/common:test_lto_standalone_command_lines on  https://buildkite.com/bazel/rules-cc/builds/5560 for Bazel HEAD; it was caused by unknown commit
    
    PiperOrigin-RevId: 940430076
    Change-Id: I737ac11551677efe25b6bb55e269d0b1c2994d41
    pzembrod authored and copybara-github committed Jun 30, 2026
    Configuration menu
    Copy the full SHA
    beab926 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2026

  1. Add Windows ThinLTO arguments

    Copybara Import from #747
    
    BEGIN_PUBLIC
    Add Windows ThinLTO arguments (#747)
    
    Windows rule-based toolchains currently reuse ELF LLD ThinLTO plugin options and `/dev/null`, which are not valid for LLD's COFF driver or Windows backend actions. This change selects the LLD COFF ThinLTO options, uses `/start-lib` and `/end-lib` for object-file groups, and uses `NUL` for indexless Windows backend actions.
    
    This allows Windows toolchains that use LLD and provide `supports_start_end_lib` to enable rules_cc distributed ThinLTO.
    
    Closes #747
    END_PUBLIC
    
    COPYBARA_INTEGRATE_REVIEW=#747 from dzbarsky:zbarsky/win-lto fad3b18
    PiperOrigin-RevId: 940818026
    Change-Id: I11c6542a1020983b20e3490af2b2e49b388105ac
    dzbarsky authored and copybara-github committed Jul 1, 2026
    Configuration menu
    Copy the full SHA
    97e2922 View commit details
    Browse the repository at this point in the history
  2. Support the new(ish) @//tools/cpp:cc_runtimes_toolchain_type toolch…

    …ain for adding runtimes-on-demand.
    
    * Add `get_cc_runtimes` and `get_cc_runtimes_copts` implementations to `cc_helper[_internal]`.
    * TODO update usage in `rules_python` and others to call `cc_helper` and deprecate `semantics.get_cc_runtimes*`
    
    Basic Usage:
    
    Define a provider like:
    ```
    CcRuntimesInfo = provider(
        doc = "Information about runtime libraries to link into c++ targets.",
        fields = ["runtimes", "copts"],
    )
    ```
    
    Define a toolchain that returns that provider:
    ```
    def _cc_runtimes_toolchain_impl(ctx):
        return [platform_common.ToolchainInfo(
            cc_runtimes_info = CcRuntimesInfo(
                runtimes = ctx.attr.runtimes,
                copts = ctx.attr.copts,
            ),
        )]
    ```
    * `runtimes` is a collection of CcInfo providing targets
    * `copts` provides compilation flags that must be used alongside this toolchain, e.g. to influence include ordering.
    
    This may be used, e.g. in rules_android_ndk: bazelbuild/rules_android_ndk#93
    
    PiperOrigin-RevId: 941244580
    Change-Id: I31bade595714dbe44aa0d70afaa97ddd788e5635
    trybka authored and copybara-github committed Jul 1, 2026
    Configuration menu
    Copy the full SHA
    5eeedeb View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2026

  1. Revert toolchain expansions and introduce profile changelist defines …

    …to linkstamp compile.
    
    In https://github.com/rules_cc/bazel/commit/9cff17dd44cb500a06591355ce39bac66695aecf I added cpp build variables to with the expecation that I would use them in linkstamp compile but it turns out there is a direct approach which avoids this. So in this change, I've reverted the changes to compile_build_variables and introduced the necessary changes to cc_helper_internal.bzl.
    
    PiperOrigin-RevId: 941422065
    Change-Id: If1155391ad9fb3f180646cbb0ed18d387402c16a
    Googler authored and copybara-github committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    da170e4 View commit details
    Browse the repository at this point in the history
  2. Automatic code cleanup.

    PiperOrigin-RevId: 941497768
    Change-Id: Idc08fbc4eb889964075bc0be921b5c9554c211ff
    meisterT authored and copybara-github committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    084155d View commit details
    Browse the repository at this point in the history
  3. Remove unused variable

    Copybara Import from #737
    
    BEGIN_PUBLIC
    Remove unused variable (#737)
    
    Closes #737
    END_PUBLIC
    
    COPYBARA_INTEGRATE_REVIEW=#737 from keith:ks/remove-unused-variable 8a1c4b3
    PiperOrigin-RevId: 941749895
    Change-Id: Id94d46bdd2cb5f9baf2ce6cfa4bc548f83572381
    keith authored and copybara-github committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    593d6fc View commit details
    Browse the repository at this point in the history
  4. Starlarkify compute_output_name_prefix_dir

    Copybara Import from #761
    
    BEGIN_PUBLIC
    Starlarkify compute_output_name_prefix_dir (#761)
    
    ## Summary
    
    Replace both `_cc_internal.compute_output_name_prefix_dir` calls with a private Starlark helper. The helper returns `non_arc` for purposes ending in `_non_objc_arc`, `arc` for purposes ending in `_objc_arc`, and an empty prefix otherwise.
    
    `compile()` normalizes an unset purpose to an empty string before these calls, so the native helper's configuration-mnemonic fallback was not reachable from either rules_cc caller.
    
    Configured-target coverage verifies that Objective-C ARC and non-ARC sources retain separate output directories.
    
    Closes #761
    END_PUBLIC
    
    COPYBARA_INTEGRATE_REVIEW=#761 from dzbarsky:codex/starlarkify-compute-output-name-prefix-dir d06f9d3
    PiperOrigin-RevId: 941761713
    Change-Id: I3398d919cf7e4b287813de168b4b80f8373f0d6e
    dzbarsky authored and copybara-github committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    fad3ad3 View commit details
    Browse the repository at this point in the history
  5. Change default needs_include_validation to match createCppCompileActi…

    …on's parameters.
    
    Java createCppCompileAction expects a boolean, this wasn't caught during testing until now.
    
    https://storage.googleapis.com/bazel-untrusted-buildkite-artifacts/019f2441-e3e8-4e78-a3e0-aea267bfa919/src/test/shell/bazel/cc_integration_test/shard_7_of_10/test.log
    
    PiperOrigin-RevId: 941839799
    Change-Id: Ifaea4b3ac9cc70d81c503032f756ee460cfd1ded
    lilygorsheneva authored and copybara-github committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    1a20833 View commit details
    Browse the repository at this point in the history
Loading