diff --git a/build/BUILD.gn b/build/BUILD.gn index 5d6abff94fe190569f4285f709518b3379ac43f8..685d3b4ee5f517c4c004333fc6f3c74ef9a6b477 100644 --- a/build/BUILD.gn +++ b/build/BUILD.gn @@ -52,6 +52,12 @@ config("flutter_config") { "-ffunction-sections", ] + if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) { + cflags += [ + "-fwhole-program-vtables", + ] + } + cflags_cc = [ "-fvisibility-inlines-hidden" ] defines = [] defines += ace_common_defines