From ec987a986832eda5a092f3c3650b375358a2fc2d Mon Sep 17 00:00:00 2001 From: Rich Kadel Date: Fri, 7 May 2021 10:57:33 -0700 Subject: [PATCH] Fixes BUILD.gn if is_fuchsia (legacy embedder) and is_debug (flutter/engine#25858) 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. --- engine/src/flutter/BUILD.gn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/BUILD.gn b/engine/src/flutter/BUILD.gn index 90d0699288..490cc949c0 100644 --- a/engine/src/flutter/BUILD.gn +++ b/engine/src/flutter/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" ] } }