This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Move !is_android to build_engine_artifacts declaration #54006
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `//flutter/build/archives:artifacts` target is used to build a zip
archive (artifacts.zip) of host tools such as flutter_tester, the Dart
kernel compiler, the impellerc shader compiler, and other tooling that
is bundled in debug-mode host builds.
The Windows/macOS/Linux target binaries (gen_snapshot) are bundled into
the same archive bundle as the host tools, but this should be refactored
such that just like every other target platform, they are bundled into
their own target-platform-specific archive, and the tool code
accordingly updated to pull these down into the appropriate cache
directory.
While this target has always been disabled explicitly for Android
builds, for some reason it was nor marked as such for iOS builds but
instead relied on `build_engine_artifacts` being false in those builds,
which occurs because its definition in `common/config.gni` is:
```
build_engine_artifacts =
flutter_build_engine_artifacts &&
(current_toolchain == host_toolchain ||
(is_linux && !is_chromeos && current_cpu != "arm") || is_mac || is_win)
```
On iOS builds, `current_toolchain` will be one of:
* `//build/toolchain/mac:ios_clang_arm`
* `//build/toolchain/mac:ios_clang_arm_sim`
* `//build/toolchain/mac:ios_clang_x64_sim`
Whereas `host_toolchain` will be one of:
* `//build/toolchain/mac:clang_arm64`
* `//build/toolchain/mac:clang_x64`
zanderso
reviewed
Jul 19, 2024
zanderso
approved these changes
Jul 19, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 19, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 19, 2024
flutter/engine@6312dfc...5810b3f 2024-07-19 chris@bracken.jp Move !is_android to build_engine_artifacts declaration (flutter/engine#54006) 2024-07-19 zanderso@users.noreply.github.com [et] Plumb -j to ninja (flutter/engine#54005) 2024-07-19 jonahwilliams@google.com [Impeller] re-enable AHB swapchain. (flutter/engine#53978) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev
pushed a commit
to TytaniumDev/flutter
that referenced
this pull request
Aug 7, 2024
…2054) flutter/engine@6312dfc...5810b3f 2024-07-19 chris@bracken.jp Move !is_android to build_engine_artifacts declaration (flutter/engine#54006) 2024-07-19 zanderso@users.noreply.github.com [et] Plumb -j to ninja (flutter/engine#54005) 2024-07-19 jonahwilliams@google.com [Impeller] re-enable AHB swapchain. (flutter/engine#53978) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi
pushed a commit
to Buchimi/flutter
that referenced
this pull request
Sep 2, 2024
…2054) flutter/engine@6312dfc...5810b3f 2024-07-19 chris@bracken.jp Move !is_android to build_engine_artifacts declaration (flutter/engine#54006) 2024-07-19 zanderso@users.noreply.github.com [et] Plumb -j to ninja (flutter/engine#54005) 2024-07-19 jonahwilliams@google.com [Impeller] re-enable AHB swapchain. (flutter/engine#53978) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
//flutter/build/archives:artifactstarget is used to build a zip archive (artifacts.zip) of host tools such as flutter_tester, the Dart kernel compiler, the impellerc shader compiler, and other tooling that is bundled in debug-mode host builds.This moves the
!is_androidto the definition ofbuild_engine_artifacts. This is required because of the way that we produce 32-bit arm gen_snapshot for Android on Windows hosts, which relies on the regular x64 host toolchain due to us having no 32-bit arm toolchain for Windows. As such,current_toolchain == host_toolchainon that platform.On iOS builds, we don't have this issue since
current_toolchainwill be one of://build/toolchain/mac:ios_clang_arm//build/toolchain/mac:ios_clang_arm_sim//build/toolchain/mac:ios_clang_x64_simWhereas
host_toolchainwill be one of://build/toolchain/mac:clang_arm64//build/toolchain/mac:clang_x64This patch also adds documentation to clarify the purpose of this target and where related artifacts are produced so that future readers don't need to do a deep dive into our build plumbing to figure this out.
While the target itself is primarily intended for producing host binaries, one target binary (gen_snapshot) is bundled into the same archive bundle as the host tools. This should be refactored such that just like iOS and Android, they are bundled into their own target-platform-specific archive, and the tool code accordingly updated to pull these down into the appropriate cache directory.
As a side-note, on macOS we do rely on this archive target for the host tools, but the bundled gen_snapshot is unused -- instead, one produced by the //flutter/sky/tools/create_macos_gen_snapshots.py script used. This should be fixe in a followup patch.
Related: flutter/flutter#38935
Identified while trying to resolve:
Issue: flutter/flutter#101138
Issue: flutter/flutter#69157
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.