Skip to content
Snippets Groups Projects
Commit 0b62df09 authored by Googler's avatar Googler Committed by fweikert
Browse files

Automated rollback of commit 4a2e51b3.

*** Reason for rollback ***

Breaks targets on the nightly TGP.

Reproduction:

blaze build //third_party/bazel_rules/rules_kotlin/tests/android/java/com/google/jni:AndroidJniTest --compilation_mode=opt --flaky_test_attempts=2 --fat_apk_cpu=x86 --android_platforms=//buildenv/platforms/android:x86 --incompatible_enable_android_toolchain_resolution=1 --collect_code_coverage=1 --instrumentation_filter=//java/com/google/android/samples/apps/topeka[/:],//third_party/bazel_rules/rules_kotlin[/:],//tools/build_defs/kotlin[/:]

TGP link: []

*** Original change description ***

Make `getPrimaryOutput()` always return the first artifact in `getOutputs()`.

This is already the case everywhere except `CppCompileAction` but was not documented, leading to `SpawnAction` unnecessarily storing a field for the primary output when it's already just the first element in its outputs. This change saves 8 bytes per `SpawnAction` and `GenRuleAction`, and moves other `SpawnAction` subclasses closer to an 8-byte threshold.

`CppCompileAction` had been using the coverage artifact (if pr

***

RELNOTES: None.
PiperOrigin-RevId: 523634597
Change-Id: I0aa70851fe4d403afabc56e808546d6638a9f2b7
parent 5ab5d80e
No related merge requests found
Showing
with 149 additions and 78 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment