From 11d5ab6ec045c8357ac1e671ce45a7476b8c8e4e Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Wed, 5 Apr 2023 21:02:47 -0700 Subject: [PATCH] Support x64 Android Also updated paths to depend on updater.h and libupdater.a from third_party directly now that DEPS knows how to pull down updater for us. We still don't build updater from gn/ninja yet (we should) but this at least fixes the ninja null build to be null again previously it was rebuilding common.shell.o every time, unclear why. --- shell/common/shell.cc | 2 +- shell/platform/android/BUILD.gn | 16 ++++++++++++++-- shell/platform/android/flutter_main.cc | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 576e97013da84..eafcac7feff3f 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -33,7 +33,7 @@ #include "third_party/skia/include/utils/SkBase64.h" #include "third_party/tonic/common/log.h" -#include "updater.h" +#include "third_party/updater/library/include/updater.h" namespace flutter { diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index 284201ec10328..628225e3cad32 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -142,9 +142,21 @@ source_set("flutter_shell_native_src") { "GLESv2", ] if (target_cpu == "arm") { - libs += [ "//flutter/updater/android_arm/libupdater.a" ] + libs += [ "//third_party/updater/target/armv7-linux-androideabi/release/libupdater.a" ] } else if (target_cpu == "arm64") { - libs += [ "//flutter/updater/android_aarch64/libupdater.a" ] + libs += [ + "//third_party/updater/target/aarch64-linux-android/release/libupdater.a", + ] + } else if (target_cpu == "x64") { + libs += [ + "//third_party/updater/target/x86_64-linux-android/release/libupdater.a", + ] + } else if (target_cpu == "x86") { + libs += [ + "//third_party/updater/target/i686-linux-android/release/libupdater.a", + ] + } else { + assert(false, "Unsupported target_cpu") } } diff --git a/shell/platform/android/flutter_main.cc b/shell/platform/android/flutter_main.cc index 3678b9aabc303..50a82da78901d 100644 --- a/shell/platform/android/flutter_main.cc +++ b/shell/platform/android/flutter_main.cc @@ -27,7 +27,7 @@ #include "third_party/dart/runtime/include/dart_tools_api.h" #include "third_party/skia/include/core/SkFontMgr.h" -#include "updater.h" +#include "third_party/updater/library/include/updater.h" namespace flutter {