blob: ae564bef7eb1a719f7b4fdbf83aeeca42a5c4e3d [file] [log] [blame]
Ben Konyi9ff7ee62017-01-06 12:38:11 -08001# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5declare_args() {
Zachary Anderson1a8174b2017-06-30 08:09:35 -07006 # Instead of using is_debug, we introduce a different flag for specifying a
7 # Debug build of Dart so that clients can still use a Release build of Dart
8 # while themselves doing a Debug build.
Aart Bik45f94622018-10-19 19:27:56 +00009 dart_debug = false
Zachary Anderson1a8174b2017-06-30 08:09:35 -070010
11 # Set the runtime mode. This affects how the runtime is built and what
12 # features it has. Valid values are:
13 # 'develop' (the default) - VM is built to run as a JIT with all development
14 # features enabled.
15 # 'profile' - The VM is built to run with AOT compiled code with only the
16 # CPU profiling features enabled.
17 # 'release' - The VM is built to run with AOT compiled code with no developer
18 # features enabled.
19 #
20 # These settings are only used for Flutter, at the moment. A standalone build
21 # of the Dart VM should leave this set to "develop", and should set
22 # 'is_debug', 'is_release', or 'is_product'.
23 #
24 # TODO(rmacnak): dart_runtime_mode no longer selects whether libdart is build
25 # for JIT or AOT, since libdart waw split into libdart_jit and
26 # libdart_precompiled_runtime. We should remove this flag and just set
27 # dart_debug/dart_product.
28 dart_runtime_mode = "develop"
29
Ryan Macnakbe95b912017-07-13 14:59:25 -070030 # Explicitly set the target architecture to use a simulator.
Samir Jindelc885bdd2019-10-27 18:18:29 +000031 # Available options are: arm, arm64, x64, ia32.
Ryan Macnakbe95b912017-07-13 14:59:25 -070032 dart_target_arch = target_cpu
Zachary Anderson1a8174b2017-06-30 08:09:35 -070033
Ben Konyi445a43b2018-10-16 22:11:05 +000034 # The optimization level to use for debug builds. Defaults to 0 for builds with
35 # code coverage enabled.
Zachary Anderson1a8174b2017-06-30 08:09:35 -070036 dart_debug_optimization_level = "2"
37
Ben Konyi445a43b2018-10-16 22:11:05 +000038 # Whether to enable code coverage for the standalone VM.
39 dart_vm_code_coverage = false
40
Ben Konyi9ff7ee62017-01-06 12:38:11 -080041 # Whether to fall back to built-in root certificates when they cannot be
42 # verified at the operating system level.
43 dart_use_fallback_root_certificates = false
44
Ben Konyi9ff7ee62017-01-06 12:38:11 -080045 # Whether to link the standalone VM against tcmalloc. The standalone build of
46 # the VM enables this only for Linux builds.
47 dart_use_tcmalloc = false
William Hesse455b1772017-12-12 13:50:01 +000048
Vyacheslav Egorov2c83eb52018-10-24 13:30:16 +000049 # Whether to link Crashpad library for crash handling. Only supported on
50 # Windows for now.
51 dart_use_crashpad = false
52
William Hesse455b1772017-12-12 13:50:01 +000053 # Controls the kind of core snapshot linked into the standalone VM. Using a
54 # core-jit snapshot breaks the ability to change various flags that affect
55 # code generation.
56 dart_core_snapshot_kind = "core"
Zachary Andersonf4758722018-01-08 08:15:22 -080057
58 # Whether the Dart binary version string should include the git hash and
59 # git commit time.
60 dart_version_git_info = true
Zach Anderson0d5cf902018-02-16 20:44:48 +000061
Ryan Macnakc354caa2018-04-27 21:14:37 +000062 # Controls whether the VM is built as a static library or a shared library.
63 if (is_fuchsia) {
64 # Allow for deduping the VM between standalone, flutter_runner and dart_runner.
Liam Appelbe583cfeb2020-06-24 20:35:19 +000065 # TODO(dartbug.com/42473): Use shared_library once elf_loader is untangled.
66 dart_component_kind = "static_library"
Ryan Macnakc354caa2018-04-27 21:14:37 +000067 } else {
68 dart_component_kind = "static_library"
69 }
RĂ©gis Crelier41fcbd02018-05-09 20:29:27 +000070
Ben Konyie35ed9c2018-05-23 20:35:53 +000071 # Whether the VM includes the kernel service in all modes (debug, release,
72 # product).
73 exclude_kernel_service = false
Michael Goderbauerd1a3eaa2018-09-25 23:58:57 +000074
75 # Whether libdart should export the symbols of the Dart API.
76 dart_lib_export_symbols = true
Tess Strickland2546ad22020-08-19 08:07:19 +000077
Liam Appelbef7eaaf22021-01-28 23:15:15 +000078 # Whether to use compressed pointers.
79 dart_use_compressed_pointers = false
Ben Konyi9ff7ee62017-01-06 12:38:11 -080080}
asivad1bd8872018-08-21 20:28:06 +000081
82declare_args() {
83 # We create a kernel service app-jit snapshot only for when the target
84 # architecture is x64 for other cases we will use the '.dill' file
85 # which is already linked in the VM.
Alexander Markov43046b72019-04-05 22:31:58 +000086 if (dart_target_arch == "x64") {
asivad1bd8872018-08-21 20:28:06 +000087 create_kernel_service_snapshot = true
88 } else {
89 create_kernel_service_snapshot = false
90 }
91}