Add a GN flag for the non-debug optimization level

Change-Id: I687e0f12a03687409abcacc33b6245bacb8a6488
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313881
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Zach Anderson 2023-07-15 14:14:59 +00:00 committed by Commit Queue
parent acd2ad41b6
commit 24f9c7c961
2 changed files with 5 additions and 2 deletions

View file

@ -211,7 +211,7 @@ config("dart_config") {
}
} else {
cflags = [
"/O2",
"/O${dart_default_optimization_level}",
"/Ob2",
"/Oy-",
"/Oi",
@ -252,7 +252,7 @@ config("dart_config") {
} else if (dart_debug) {
cflags += [ "-O${dart_debug_optimization_level}" ]
} else {
cflags += [ "-O2" ]
cflags += [ "-O${dart_default_optimization_level}" ]
}
if (is_fuchsia) {

View file

@ -35,6 +35,9 @@ declare_args() {
# code coverage enabled.
dart_debug_optimization_level = "2"
# The optimization level to use for non-debug builds.
dart_default_optimization_level = "2"
# Whether to enable code coverage for the standalone VM.
dart_vm_code_coverage = false