package/flutter-sdk-bin: add dart arguments for different runtime modes
Now that profile mode is an option for the flutter-engine package, the logic in package/flutter-sdk-bin/flutter-sdk-bin.mk is no longer sufficient. The profile/debug/release logic was inspired by: https://github.com/meta-flutter/meta-flutter/blob/kirkstone/conf/include/ Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> [yann.morin.1998@free.fr: - make FLUTTER_ENGINE_RUNTIME_MODE_PROFILE win over BR2_ENABLE_RUNTIME_DEBUG - don't set variables to empty string ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
parent
9024e18665
commit
66414ed526
@ -54,14 +54,20 @@ define HOST_FLUTTER_SDK_BIN_INSTALL_CMDS
|
||||
cp -rpdT $(@D)/. $(HOST_FLUTTER_SDK_BIN_SDK)/
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
|
||||
HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
|
||||
$(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk
|
||||
ifeq ($(FLUTTER_ENGINE_RUNTIME_MODE_PROFILE),y)
|
||||
HOST_FLUTTER_SDK_BIN_PROFILE_FLAGS = --track-widget-creation
|
||||
HOST_FLUTTER_SDK_BIN_SDK_PRODUCT = false
|
||||
HOST_FLUTTER_SDK_BIN_SDK_ROOT = $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk
|
||||
HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE = true
|
||||
else ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
|
||||
HOST_FLUTTER_SDK_BIN_DEBUG_FLAGS = --enable-asserts
|
||||
HOST_FLUTTER_SDK_BIN_SDK_PRODUCT = false
|
||||
HOST_FLUTTER_SDK_BIN_SDK_ROOT = $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk
|
||||
HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE = false
|
||||
else
|
||||
HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
|
||||
$(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk_product
|
||||
HOST_FLUTTER_SDK_BIN_SDK_PRODUCT = true
|
||||
HOST_FLUTTER_SDK_BIN_SDK_ROOT = $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk_product
|
||||
HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE = false
|
||||
endif
|
||||
|
||||
# The Order matters.Taken from:
|
||||
@ -73,8 +79,10 @@ HOST_FLUTTER_SDK_BIN_DART_ARGS = \
|
||||
--sdk-root $(HOST_FLUTTER_SDK_BIN_SDK_ROOT) \
|
||||
--target=flutter \
|
||||
--no-print-incremental-dependencies \
|
||||
-Ddart.vm.profile=false \
|
||||
-Ddart.vm.profile=$(HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE) \
|
||||
-Ddart.vm.product=$(HOST_FLUTTER_SDK_BIN_SDK_PRODUCT) \
|
||||
$(HOST_FLUTTER_SDK_BIN_DEBUG_FLAGS) \
|
||||
$(HOST_FLUTTER_SDK_BIN_PROFILE_FLAGS) \
|
||||
--aot \
|
||||
--tfa \
|
||||
--target-os linux \
|
||||
|
Loading…
Reference in New Issue
Block a user