Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Mar 29, 2025
    • Bazel Release System's avatar
      Release 9.0.0-pre.20250324.2 (2025-03-28) · 947f2780
      Bazel Release System authored
      Baseline: 7e538803
      
      Cherry picks:
      
         + fa6b1b7e:
           Reverse a RAM regression introduced by
           https://github.com/bazelbuild/bazel/commit/7e538803d775929beb3c9a
           f1cd2e87667d373bbe
      
      Important changes:
      
        - The new
          `--@bazel_tools//tools/test:incompatible_use_default_test_toolchai
          n` flag can be used to have test actions select an execution
          platform that has all the constraints provided by the target
          platform instead of always selecting the first available
          execution platform. This supersedes the
          `--use_target_platform_for_tests` flag.
        - `--experimental_downloader_config` is now no longer experimental,
          and has been renamed to `--downloader_config`. The old flag name
          can still be used.
      
      This release contains contributions from many people at Google, as well as Benjamin Peterson, Fabian Meumertzheim, Kevin Bernal, Lszl Csomor, tfrench.
    • Googler's avatar
      Reverse a RAM regression introduced by... · a1c1b43a
      Googler authored
      Reverse a RAM regression introduced by https://github.com/bazelbuild/bazel/commit/7e538803d775929beb3c9af1cd2e87667d373bbe
      
      That CL factored some content of `Rule` into a new base class, `RuleOrMacroInstance`. In doing so, it added two new fields to `Rule` instances, causing a 1% RAM regression on a large `query` invocation.
      
      This CL eliminates the two extra fields.
      
      `attrCount`, the number of attributes in the rule or macro's schema (not to be confused with the number of attributes actually stored on the instance, which may change after freezing/compacting), can be obtained from the schema via the subclass's `ruleClass` or `macroClass` field without storing it as an additional field on the base class. We have to take care not to do this retrieval of the subclass field while executing the super constructor (i.e. before the subclass field is initialized). That's solved by threading `attrCount` into `bitSetSize` as a parameter.
      
      (A prior draft of this CL went through some indirect initialization logic whereby the super constructor called an abstract method to initialized the subclass field. Thanks to arostovtsev@ for pointing out that this was unnecessary.)
      
      The second field, `packageDeclarations`, is replaced by an abstract getter that already exists on `Rule` and which is added to `MacroInstance` in this CL. It's probably not really needed on `MacroInstance`, but we can eliminate that latter; the cost of an extra field on a macro is nothing like the cost of an extra field on a rule.
      
      PiperOrigin-RevId: 740793903
      Change-Id: Iec65f20ff459e33c3961b16d9d51d0d4a22f0e00
      a1c1b43a
  2. Mar 23, 2025
    • Googler's avatar
      Use rule machinery for handling Symbolic Macro attrs in order to reduce the... · 7e538803
      Googler authored
      Use rule machinery for handling Symbolic Macro attrs in order to reduce the memory overhead of symbolic macros.
      
      In particular, RuleOrMacroInstance holds shared logic between Rule and MacroInstance, and both RuleClass and MacroClass now hold an AttributeProvider, which gives access to their Attributes.
      
      Together, this gives us:
      - Use of the package's list interner for attributes
      - Map of Attributes is now a list (the key/name is already stored in the attribute)
      - Default values of Attributes are not stored
      - Compact attr representation once the macro is frozen
      - Attrs are stored as Native types instead of Starlark types
      
      As a side effect of doing this, Attribute.valueToStarlark() now works with Selects.
      
      PiperOrigin-RevId: 739568597
      Change-Id: Ia6219f3105ede816c08105fec6c0df03d7b8a5e6
      7e538803
    • Googler's avatar
      Remove `apple_common.get_cpu` · 4f40b7fb
      Googler authored
      it is no longer needed after https://github.com/bazelbuild/rules_apple/commit/0410c024c1eac29f8cfbe4f7c78bef54c92d0422
      
      PiperOrigin-RevId: 739519966
      Change-Id: I56feb5620d56665199b2226d60dbbfee75f5990d
      4f40b7fb
  3. Mar 22, 2025
  4. Mar 21, 2025
  5. Mar 20, 2025