Skip to content

kDebugMode not being set #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Charlie9830 opened this issue Jul 25, 2021 · 1 comment
Closed

kDebugMode not being set #193

Charlie9830 opened this issue Jul 25, 2021 · 1 comment

Comments

@Charlie9830
Copy link

Charlie9830 commented Jul 25, 2021

Hi Ardera.

I am using flutter-pi as part of a Yocto build.
Based off of jwinarkse's build.

The engine is built in release mode, as is my Flutter App. However, the Dart constant kDebugMode is evaluating to true at runtime.

The Flutter documentation suggests the follow about the kDebugMode constant.

More specifically, this is a constant that is true if the application was not compiled with '-Ddart.vm.product=true' and
'-Ddart.vm.profile=true'.

Source

I am not skilled with C or C++, would I be correct in assuming that those flags need to be set whilst compiling the embedder?

@ardera
Copy link
Owner

ardera commented Sep 13, 2021

no, those flags are set when generating the AOT snapshot using the gen_snapshot executable. See the building the app.so section in the readme, step 4. The commandline argument -Ddart.vm.product=true is what sets that flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants