Skip to content

aosp: Fix --disable-quic default not applied on AOSP - #13482

Merged
kjyoun merged 3 commits into
youtube:mainfrom
kjyoun:fix-aosp-disable-quic
Oct 21, 2026
Merged

kjyoun merged 3 commits into
youtube:mainfrom
kjyoun:fix-aosp-disable-quic

Conversation

@kjyoun

@kjyoun kjyoun commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

BUILDFLAG(IS_ANDROID) is never true in the AOSP Cobalt core (an Evergreen
build with target_os = "linux"), so the --disable-quic default from
#13468 was never applied, and QUIC was back on for AOSP.

Evergreen builds shouldn't differentiate platforms in the Cobalt core, so
set AOSP's defaults in the AOSP Starboard layer instead.

  • Add --disable-quic to kDefaultSwitches in main_activity.cc, next to
    the existing --disable-dev-shm-usage.
  • Add starboard/aosp/shared/chromium_switches.h so both use constants
    instead of string literals. Chromium's ::switches constants aren't
    available in the AOSP Starboard toolchain.
  • Remove the dead BUILDFLAG(IS_ANDROID) blocks in
    cobalt_switch_defaults_starboard.cc and its test. They have been
    unreachable since the file became Starboard-only (Rename switch defaults src to state it's for linux #6046).

Bug: 532158865

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ✅ PASS All checks passed
CI / android ✅ PASS Passed
CI / evergreen ✅ PASS Passed
CI / linux ✅ PASS Passed
CI / tvos ✅ PASS Passed
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Fix --disable-quic default on AOSP

AOSP Evergreen builds are configured with target_os = "linux", which
results in BUILDFLAG(IS_ANDROID) being false within the Cobalt core.
This caused the --disable-quic default to be ignored on AOSP platforms
after it was moved from Java to C++.

Introduce an IS_COBALT_AOSP buildflag derived from starboard_path to
properly detect AOSP builds. Use this flag to ensure QUIC is disabled
by default on AOSP and add a unit test to verify the behavior.

Bug: 532158865

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch 2 times, most recently from b60f93d to d272452 Compare October 19, 2026 22:00
@kjyoun kjyoun changed the title aosp: Fix --disable-quic default not applied on AOSP Oct 19, 2026
@kjyoun
kjyoun marked this pull request as ready for review October 19, 2026 22:06
@kjyoun
kjyoun requested a review from andrewsavage1 October 19, 2026 22:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new build flag IS_COBALT_AOSP to correctly identify AOSP platforms, since BUILDFLAG(IS_ANDROID) is false for Cobalt core on AOSP (which is built with target_os = 'linux'). It updates the default command-line switches to disable QUIC on AOSP instead of Android, adds corresponding unit tests, and propagates the new build flag dependency. Feedback on the changes suggests making the _is_cobalt_aosp detection in cobalt/build/configs/BUILD.gn more robust by explicitly handling cases where starboard_path does not have a trailing slash.

Comment thread cobalt/build/configs/BUILD.gn Resolved
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from d272452 to 8a41427 Compare October 19, 2026 22:25
@kjyoun kjyoun changed the title aosp: Fix --disable-quic default on AOSP Oct 19, 2026
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from 8a41427 to 7fe27ad Compare October 19, 2026 23:26
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from 7fe27ad to f8dfa2d Compare October 20, 2026 06:02
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from f8dfa2d to 82046d0 Compare October 20, 2026 06:10
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from 82046d0 to 415411e Compare October 20, 2026 06:17
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from 415411e to adbd075 Compare October 20, 2026 06:26
@kjyoun
kjyoun force-pushed the fix-aosp-disable-quic branch from adbd075 to bb698d2 Compare October 20, 2026 06:29
@kjyoun kjyoun changed the title aosp: Fix --disable-quic default not applied on AOSP Oct 20, 2026
youtube#13468 moved AOSP's --disable-quic default into
cobalt_switch_defaults_starboard.cc under BUILDFLAG(IS_ANDROID). That
guard is never true there: the AOSP Cobalt core is an Evergreen build
with target_os = "linux", so QUIC was back on for AOSP.

Evergreen builds shouldn't differentiate platforms in the Cobalt core,
so set AOSP's defaults in the AOSP Starboard layer instead.
main_activity.cc builds the argv passed to the core and already adds
--disable-dev-shm-usage; move both into a kDefaultSwitches list.

Add starboard/aosp/shared/chromium_switches.h so these use constants
rather than string literals. Chromium's ::switches constants aren't
available in the AOSP Starboard toolchain (current_os = "android",
//copied_base/base):
- network_switches:: expands Chromium's header-only network_switch_list.h,
  so kDisableQuic matches ::switches::kDisableQuic.
- base_switches::kDisableDevShmUsage copies the value from
  base/base_switches.cc.

Also remove the dead BUILDFLAG(IS_ANDROID) blocks from
cobalt_switch_defaults_starboard.cc and its test. The test's block
(kUserLevelMemoryPressureSignalParams, kDisableQuic) has been unreachable
since the file became Starboard-only (youtube#6046).

Bug: 532158865
cobalt_switch_defaults_starboard.cc no longer uses ::switches::kDisableQuic.
kDefaultSwitches is already inside namespace starboard.
@kjyoun
kjyoun enabled auto-merge (squash) October 21, 2026 20:44
@kjyoun
kjyoun merged commit b2908eb into youtube:main Oct 21, 2026
721 of 726 checks passed
@kjyoun
kjyoun deleted the fix-aosp-disable-quic branch October 21, 2026 22:13
briantting pushed a commit that referenced this pull request Oct 22, 2026
…n AOSP

Refer to original PR: #13482

`BUILDFLAG(IS_ANDROID)` is never true in the AOSP Cobalt core (an
Evergreen
build with `target_os = "linux"`), so the `--disable-quic` default from
#13468 was never applied, and QUIC was back on for AOSP.

Evergreen builds shouldn't differentiate platforms in the Cobalt core,
so
set AOSP's defaults in the AOSP Starboard layer instead.

- Add `--disable-quic` to `kDefaultSwitches` in `main_activity.cc`, next
to
  the existing `--disable-dev-shm-usage`.
- Add `starboard/aosp/shared/chromium_switches.h` so both use constants
  instead of string literals. Chromium's `::switches` constants aren't
  available in the AOSP Starboard toolchain.
- Remove the dead `BUILDFLAG(IS_ANDROID)` blocks in
  `cobalt_switch_defaults_starboard.cc` and its test. They have been
  unreachable since the file became Starboard-only (#6046).

Bug: 532158865

(cherry picked from commit b2908eb)
briantting pushed a commit that referenced this pull request Oct 27, 2026
…n AOSP

Refer to original PR: #13482

`BUILDFLAG(IS_ANDROID)` is never true in the AOSP Cobalt core (an
Evergreen
build with `target_os = "linux"`), so the `--disable-quic` default from
#13468 was never applied, and QUIC was back on for AOSP.

Evergreen builds shouldn't differentiate platforms in the Cobalt core,
so
set AOSP's defaults in the AOSP Starboard layer instead.

- Add `--disable-quic` to `kDefaultSwitches` in `main_activity.cc`, next
to
  the existing `--disable-dev-shm-usage`.
- Add `starboard/aosp/shared/chromium_switches.h` so both use constants
  instead of string literals. Chromium's `::switches` constants aren't
  available in the AOSP Starboard toolchain.
- Remove the dead `BUILDFLAG(IS_ANDROID)` blocks in
  `cobalt_switch_defaults_starboard.cc` and its test. They have been
  unreachable since the file became Starboard-only (#6046).

Bug: 532158865

(cherry picked from commit b2908eb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants