From 6960bd13da2ff023e2701fe03945a9ba54015364 Mon Sep 17 00:00:00 2001 From: Rich Kadel Date: Fri, 30 Apr 2021 09:41:04 -0700 Subject: [PATCH] Fixes BUILD.gn if is_fuchsia (legacy embedder) and is_debug Current recommended build methods may not trigger this issue, but while trying different options, building flutter for the first time, I noticed a build error because `defines` was assigned twice. If building with both options is ever supported, I think this fixes the error. --- BUILD.gn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 90d069928888e..490cc949c03fc 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -21,16 +21,18 @@ config("config") { } } + defines = [] + # This define is transitional and will be removed after the embedder API # transition is complete. # # TODO(bugs.fuchsia.dev/54041): Remove when no longer necessary. if (is_fuchsia && flutter_enable_legacy_fuchsia_embedder) { - defines = [ "LEGACY_FUCHSIA_EMBEDDER" ] + defines += [ "LEGACY_FUCHSIA_EMBEDDER" ] } if (is_debug) { - defines = [ "FLUTTER_ENABLE_DIFF_CONTEXT" ] + defines += [ "FLUTTER_ENABLE_DIFF_CONTEXT" ] } }