Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 08/11] package/flutter-sdk-bin: add dart arguments for different runtime modes
Date: Thu, 11 Jan 2024 19:48:58 +0100	[thread overview]
Message-ID: <ZaA4GvpdWkjt9kb5@landeda> (raw)
In-Reply-To: <20240102235957.3072102-9-adam.duskett@amarulasolutions.com>

ADam, All,

On 2024-01-02 16:59 -0700, Adam Duskett spake thusly:
> 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.
> 
> Add an ifeq statement for FLUTTER_ENGINE_RUNTIME_MODE_PROFILE and set the
> following logic, borrowed from
> https://github.com/meta-flutter/meta-flutter/blob/kirkstone/conf/include/flutter-app.inc#L239
> 
> ```
> HOST_FLUTTER_SDK_BIN_PROFILE_FLAGS = --track-widget-creation
> HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE = true
> ```
> 
> The FLUTTER_ENGINE_RUNTIME_MODE_PROFILE also sets
> HOST_FLUTTER_SDK_BIN_SDK_PRODUCT to false, and the
> HOST_FLUTTER_SDK_BIN_SDK_ROOT to
> $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk. Which is the
> same as Debug mode.
> 
> The -Ddart.vm.profile option is no longer hard coded to false and is set to
> the value of the HOST_FLUTTER_SDK_BIN_SDK_VM_PROFILE variable.
> 
> Finally, add the following new variables to HOST_FLUTTER_SDK_BIN_DART_ARGS:
>   - HOST_FLUTTER_SDK_BIN_DEBUG_FLAGS
>   - HOST_FLUTTER_SDK_BIN_PROFILE_FLAGS
> 
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
>  package/flutter-sdk-bin/flutter-sdk-bin.mk | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/package/flutter-sdk-bin/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk
> index a28cf645f3..e7fd09cb56 100644
> --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk
> +++ b/package/flutter-sdk-bin/flutter-sdk-bin.mk
> @@ -55,13 +55,20 @@ define HOST_FLUTTER_SDK_BIN_INSTALL_CMDS
>  endef
>  
>  ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
> -HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
> -	$(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk
> +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
> +else 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
> -HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
> -	$(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk_product
> +HOST_FLUTTER_SDK_BIN_DEBUG_FLAGS =
> +HOST_FLUTTER_SDK_BIN_PROFILE_FLAGS =
>  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

This if-elif-else block is not in the same order as the one to enable
profiling in flutter-engine. Here you have: debug, profiling, release,
while in flutter-engine the order is: profiling, debug, release.

Shouldn't the two match, i.e. should we swap the debug and profiling
blocks here?

If so, I can do so when applying.

(Also, the commit log is descriptive, not explanatory, but I can trimmed
it to the needed info when applying, too).

Regards,
Yann E. MORIN.

>  # The Order matters.Taken from:
> @@ -73,8 +80,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 \
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-01-11 18:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 23:59 [Buildroot] [PATCH v3 00/11] flutter package improvements Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 01/11] package/Config.in: move flutter-pi Adam Duskett
2024-01-10 22:45   ` Yann E. MORIN
2024-01-13 20:18   ` Peter Korsgaard
2024-01-02 23:59 ` [Buildroot] [PATCH v3 02/11] package/Config.in: move flutter-gallery menu entry Adam Duskett
2024-01-10 22:46   ` Yann E. MORIN
2024-01-13 20:18   ` Peter Korsgaard
2024-01-02 23:59 ` [Buildroot] [PATCH v3 03/11] package/flutter-sdk-bin: bump version to 3.16.5 Adam Duskett
2024-01-10 23:21   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 04/11] package/flutter-engine: " Adam Duskett
2024-01-10 23:22   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 05/11] package/flutter-pi: bump version to f34d7bdbda713ba607b9625541ddfa314d9999a0 Adam Duskett
2024-01-11 18:35   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 06/11] package/flutter-pi: add the charset converter plugin as a menuconfig option Adam Duskett
2024-01-11 18:38   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 07/11] package/flutter-engine: Add profile runtime mode selection Adam Duskett
2024-01-11 18:43   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 08/11] package/flutter-sdk-bin: add dart arguments for different runtime modes Adam Duskett
2024-01-11 18:48   ` Yann E. MORIN [this message]
2024-01-11 19:40     ` Adam Duskett
2024-01-11 20:22       ` Yann E. MORIN
2024-01-11 20:28   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 09/11] package/flutter-gallery: add a configure step Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 10/11] package/flutter-gallery: clean up install_target_cmds Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 11/11] package/flutter-sdk-bin/Config.in.host: add pub-cache location option Adam Duskett
2024-01-13 17:32   ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZaA4GvpdWkjt9kb5@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox