Skip to content

build: fix condition for removing NetworkChangeNotifier on hermetic builds#10028

Open
rogerzanoni wants to merge 1 commit intoyoutube:mainfrom
rogerzanoni:aosp-arm_gn-net-hermetic-build
Open

build: fix condition for removing NetworkChangeNotifier on hermetic builds#10028
rogerzanoni wants to merge 1 commit intoyoutube:mainfrom
rogerzanoni:aosp-arm_gn-net-hermetic-build

Conversation

@rogerzanoni
Copy link
Copy Markdown
Collaborator

The base/network_change_notifier_linux.* files are added to the sources only for linux builds, but should be removed for hermetic builds. Add the same is_linux guard to check if the files should be removed from source to fix the following gn gen issue:

ERROR at //net/BUILD.gn:1334:7: Item not found
"base/network_change_notifier_linux.cc"

Bug: 495203133

…tic builds

The base/network_change_notifier_linux.* files are added to the sources
only for linux builds, but should be removed for hermetic builds. Add
the same is_linux guard to check if the files should be removed from
source to fix the following gn gen issue:

ERROR at //net/BUILD.gn:1334:7: Item not found
      "base/network_change_notifier_linux.cc"

Bug: 495203133
@rogerzanoni rogerzanoni requested a review from a team as a code owner April 14, 2026 19:36
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


build: Fix condition for removing NetworkChangeNotifier

Previously, the condition for removing network change notifier files
on hermetic builds was applied unconditionally. These files are only
added to the source list for Linux builds. Applying the removal
condition without an is_linux guard could lead to a GN generation
error when attempting to remove files that were never added.

Add an is_linux guard to the removal condition to ensure that the
network change notifier files are only removed if they are present in
the build configuration, preventing 'Item not found' errors.

Bug: 495203133

💡 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

Copy link
Copy Markdown
Contributor

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

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 updates net/BUILD.gn to restrict the removal of Linux-specific network change notifier source files to builds where both is_linux and is_cobalt_hermetic_build are true. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant