From f1937cf92fbf85e0a30d6bc8b8be0e0b25c2b826 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 19 Mar 2020 18:13:40 -0700 Subject: [PATCH] Disable the use of the API_AVAILABLE macro in Skia in iOS release builds. (flutter/engine#17213) The use of this macro in C++ translation units leads to the symbol visibility being switched to default instead of hidden. This only happens in bitcode enabled builds. A toolchain upgrade will be necessary to undo this workaround. --- engine/src/flutter/tools/gn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/gn b/engine/src/flutter/tools/gn index b7cb71763d..0fb187febd 100755 --- a/engine/src/flutter/tools/gn +++ b/engine/src/flutter/tools/gn @@ -222,7 +222,10 @@ def to_gn_args(args): if args.enable_metal: gn_args['skia_use_metal'] = True gn_args['shell_enable_metal'] = True - gn_args['allow_deprecated_api_calls'] = True + # Bitcode enabled builds using the current version of the toolchain leak + # C++ symbols decorated with the availability attribute. Disable these + # attributes in release modes till the toolchain is updated. + gn_args['skia_enable_api_available_macro'] = args.runtime_mode != "release" if args.enable_vulkan: # Enable vulkan in the Flutter shell.