diff --git a/package/flutter-engine/Config.in b/package/flutter-engine/Config.in index 2ec5b90ffd..3c92e40f74 100644 --- a/package/flutter-engine/Config.in +++ b/package/flutter-engine/Config.in @@ -39,6 +39,31 @@ config BR2_PACKAGE_FLUTTER_ENGINE https://github.com/flutter/engine +if BR2_PACKAGE_FLUTTER_ENGINE + +config FLUTTER_ENGINE_RUNTIME_MODE_PROFILE + bool "enable profiling" + help + Some debugging ability is maintained—enough to profile your + apps performance. Profile mode is disabled on the emulator + and simulator, because their behavior is not representative + of real performance. Profile mode is similar to release mode, + with the following differences: + + - Some service extensions, such as the one that enables the + performance overlay, are enabled. + + - Tracing is enabled, and tools supporting source-level + debugging (such as DevTools) can connect to the process. + + If this option is left unselected, the global option + BR2_ENABLE_RUNTIME_DEBUG determines whether to build Flutter + in release or debug mode. + + https://docs.flutter.dev/testing/build-modes#profile + +endif + comment "flutter-engine needs an OpenGL or OpenGLES backend" depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk index c3ac144f2a..e972612097 100644 --- a/package/flutter-engine/flutter-engine.mk +++ b/package/flutter-engine/flutter-engine.mk @@ -52,7 +52,9 @@ FLUTTER_ENGINE_TARGET_ARCH = x64 FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-unknown-linux-gnu endif -ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y) +ifeq ($(FLUTTER_ENGINE_RUNTIME_MODE_PROFILE),y) +FLUTTER_ENGINE_RUNTIME_MODE=profile +else ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y) FLUTTER_ENGINE_RUNTIME_MODE=debug else FLUTTER_ENGINE_RUNTIME_MODE=release