diff --git a/patch/patch.cfg b/patch/patch.cfg index 6264de4eb..588954db3 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -600,5 +600,11 @@ patches = [ # Fix deadlock in EmbeddedTestServer::ShutdownAndWaitUntilComplete. # https://chromium-review.googlesource.com/c/chromium/src/+/3798752 'name': 'net_test_server_3798752' + }, + { + # Windows: Fix unresolved dependencies error in + # //components/segmentation_platform/embedder on ARM64. + # https://bugs.chromium.org/p/chromium/issues/detail?id=1355185 + 'name': 'windows_arm_1355185', } ] diff --git a/patch/patches/windows_arm_1355185.patch b/patch/patches/windows_arm_1355185.patch new file mode 100644 index 000000000..d382666a3 --- /dev/null +++ b/patch/patches/windows_arm_1355185.patch @@ -0,0 +1,29 @@ +diff --git components/segmentation_platform/embedder/BUILD.gn components/segmentation_platform/embedder/BUILD.gn +index 385ab7e469f4e..9bbac1528bcf0 100644 +--- components/segmentation_platform/embedder/BUILD.gn ++++ components/segmentation_platform/embedder/BUILD.gn +@@ -2,6 +2,8 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + ++import("//components/optimization_guide/features.gni") ++ + if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +@@ -21,11 +23,14 @@ source_set("embedder") { + "//components/optimization_guide/core", + "//components/optimization_guide/core:features", + "//components/segmentation_platform/internal", +- "//components/segmentation_platform/internal:optimization_guide_segmentation_handler", + "//components/segmentation_platform/internal/proto", + "//components/segmentation_platform/public", + "//url", + ] ++ ++ if (build_with_tflite_lib) { ++ deps += [ "//components/segmentation_platform/internal:optimization_guide_segmentation_handler" ] ++ } + } + + source_set("unit_tests") {