)]}'
{
  "commit": "5810b3fc791f4bb82b9a454014310990eddc1181",
  "tree": "6390350c10a796a2f062592cafc58e0b2ed2cc95",
  "parents": [
    "eb7c8807e12af55905d7c472de3bdb18035f40fc"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Fri Jul 19 13:34:28 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jul 19 13:34:28 2024 -0700"
  },
  "message": "Move !is_android to build_engine_artifacts declaration (#54006)\n\nThe `//flutter/build/archives:artifacts` target is used to build a zip\r\narchive (artifacts.zip) of host tools such as flutter_tester, the Dart\r\nkernel compiler, the impellerc shader compiler, and other tooling that\r\nis bundled in debug-mode host builds.\r\n\r\nThis moves the `!is_android` to the definition of\r\n`build_engine_artifacts`. This is required because of the way that we\r\nproduce 32-bit arm gen_snapshot for Android on Windows hosts, which\r\nrelies on the regular x64 host toolchain due to us having no 32-bit arm\r\ntoolchain for Windows. As such, `current_toolchain \u003d\u003d host_toolchain` on\r\nthat platform.\r\n\r\n```\r\nbuild_engine_artifacts \u003d\r\n    flutter_build_engine_artifacts \u0026\u0026\r\n    (current_toolchain \u003d\u003d host_toolchain ||\r\n     (is_linux \u0026\u0026 !is_chromeos \u0026\u0026 current_cpu !\u003d \"arm\") || is_mac || is_win)\r\n```\r\n\r\nOn iOS builds, we don\u0027t have this issue since `current_toolchain` will\r\nbe one of:\r\n* `//build/toolchain/mac:ios_clang_arm`\r\n* `//build/toolchain/mac:ios_clang_arm_sim`\r\n* `//build/toolchain/mac:ios_clang_x64_sim`\r\n\r\nWhereas `host_toolchain` will be one of:\r\n* `//build/toolchain/mac:clang_arm64`\r\n* `//build/toolchain/mac:clang_x64`\r\n\r\nThis patch also adds documentation to clarify the purpose of this target\r\nand where related artifacts are produced so that future readers don\u0027t\r\nneed to do a deep dive into our build plumbing to figure this out.\r\n\r\nWhile the target itself is primarily intended for producing host\r\nbinaries, one target binary (gen_snapshot) is bundled into the same\r\narchive bundle as the host tools. This should be refactored such that\r\njust like iOS and Android, they are bundled into their own\r\ntarget-platform-specific archive, and the tool code accordingly updated\r\nto pull these down into the appropriate cache directory.\r\n\r\nAs a side-note, on macOS we do rely on this archive target for the host\r\ntools, but the bundled gen_snapshot is unused -- instead, one produced\r\nby the //flutter/sky/tools/create_macos_gen_snapshots.py script used.\r\nThis should be fixe in a followup patch.\r\n\r\nRelated: https://github.com/flutter/flutter/issues/38935\r\n\r\nIdentified while trying to resolve:\r\nIssue: https://github.com/flutter/flutter/issues/101138\r\nIssue: https://github.com/flutter/flutter/issues/69157\r\n\r\n## Pre-launch Checklist\r\n\r\n- [X] I read the [Contributor Guide] and followed the process outlined\r\nthere for submitting PRs.\r\n- [X] I read the [Tree Hygiene] wiki page, which explains my\r\nresponsibilities.\r\n- [X] I read and followed the [Flutter Style Guide] and the [C++,\r\nObjective-C, Java style guides].\r\n- [X] I listed at least one issue that this PR fixes in the description\r\nabove.\r\n- [X] I added new tests to check the change I am making or feature I am\r\nadding, or the PR is [test-exempt]. See [testing the engine] for\r\ninstructions on writing and running engine tests.\r\n- [X] I updated/added relevant documentation (doc comments with `///`).\r\n- [X] I signed the [CLA].\r\n- [X] All existing and new tests are passing.\r\n\r\nIf you need help, consider asking for advice on the #hackers-new channel\r\non [Discord].\r\n\r\n\u003c!-- Links --\u003e\r\n[Contributor Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#overview\r\n[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene\r\n[test-exempt]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#tests\r\n[Flutter Style Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo\r\n[C++, Objective-C, Java style guides]:\r\nhttps://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style\r\n[testing the engine]:\r\nhttps://github.com/flutter/flutter/wiki/Testing-the-engine\r\n[CLA]: https://cla.developers.google.com/\r\n[flutter/tests]: https://github.com/flutter/tests\r\n[breaking change policy]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes\r\n[Discord]: https://github.com/flutter/flutter/wiki/Chat",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "809312c739da032242d06e2ccc447a5a2a71368f",
      "old_mode": 33188,
      "old_path": "build/archives/BUILD.gn",
      "new_id": "dd35d33fd7014a57cf3f4931ade8a24da0a798fd",
      "new_mode": 33188,
      "new_path": "build/archives/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "c587735b5063ea0f3a2f65ea769e6a7478f32edb",
      "old_mode": 33188,
      "old_path": "common/config.gni",
      "new_id": "4f8f690811c380023a50f36f9c9443a2f709298b",
      "new_mode": 33188,
      "new_path": "common/config.gni"
    }
  ]
}
