Ben Konyi | 9ff7ee6 | 2017-01-06 12:38:11 -0800 | [diff] [blame] | 1 | # 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 | |
| 5 | declare_args() { |
Zachary Anderson | 1a8174b | 2017-06-30 08:09:35 -0700 | [diff] [blame] | 6 | # 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 Bik | 45f9462 | 2018-10-19 19:27:56 +0000 | [diff] [blame] | 9 | dart_debug = false |
Zachary Anderson | 1a8174b | 2017-06-30 08:09:35 -0700 | [diff] [blame] | 10 | |
| 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 Macnak | be95b91 | 2017-07-13 14:59:25 -0700 | [diff] [blame] | 30 | # Explicitly set the target architecture to use a simulator. |
Samir Jindel | c885bdd | 2019-10-27 18:18:29 +0000 | [diff] [blame] | 31 | # Available options are: arm, arm64, x64, ia32. |
Ryan Macnak | be95b91 | 2017-07-13 14:59:25 -0700 | [diff] [blame] | 32 | dart_target_arch = target_cpu |
Zachary Anderson | 1a8174b | 2017-06-30 08:09:35 -0700 | [diff] [blame] | 33 | |
Ben Konyi | 445a43b | 2018-10-16 22:11:05 +0000 | [diff] [blame] | 34 | # The optimization level to use for debug builds. Defaults to 0 for builds with |
| 35 | # code coverage enabled. |
Zachary Anderson | 1a8174b | 2017-06-30 08:09:35 -0700 | [diff] [blame] | 36 | dart_debug_optimization_level = "2" |
| 37 | |
Ben Konyi | 445a43b | 2018-10-16 22:11:05 +0000 | [diff] [blame] | 38 | # Whether to enable code coverage for the standalone VM. |
| 39 | dart_vm_code_coverage = false |
| 40 | |
Ben Konyi | 9ff7ee6 | 2017-01-06 12:38:11 -0800 | [diff] [blame] | 41 | # 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 Konyi | 9ff7ee6 | 2017-01-06 12:38:11 -0800 | [diff] [blame] | 45 | # 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 Hesse | 455b177 | 2017-12-12 13:50:01 +0000 | [diff] [blame] | 48 | |
Vyacheslav Egorov | 2c83eb5 | 2018-10-24 13:30:16 +0000 | [diff] [blame] | 49 | # Whether to link Crashpad library for crash handling. Only supported on |
| 50 | # Windows for now. |
| 51 | dart_use_crashpad = false |
| 52 | |
William Hesse | 455b177 | 2017-12-12 13:50:01 +0000 | [diff] [blame] | 53 | # 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 Anderson | f475872 | 2018-01-08 08:15:22 -0800 | [diff] [blame] | 57 | |
| 58 | # Whether the Dart binary version string should include the git hash and |
| 59 | # git commit time. |
| 60 | dart_version_git_info = true |
Zach Anderson | 0d5cf90 | 2018-02-16 20:44:48 +0000 | [diff] [blame] | 61 | |
Ryan Macnak | c354caa | 2018-04-27 21:14:37 +0000 | [diff] [blame] | 62 | # 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 Appelbe | 583cfeb | 2020-06-24 20:35:19 +0000 | [diff] [blame] | 65 | # TODO(dartbug.com/42473): Use shared_library once elf_loader is untangled. |
| 66 | dart_component_kind = "static_library" |
Ryan Macnak | c354caa | 2018-04-27 21:14:37 +0000 | [diff] [blame] | 67 | } else { |
| 68 | dart_component_kind = "static_library" |
| 69 | } |
RĂ©gis Crelier | 41fcbd0 | 2018-05-09 20:29:27 +0000 | [diff] [blame] | 70 | |
Ben Konyi | e35ed9c | 2018-05-23 20:35:53 +0000 | [diff] [blame] | 71 | # Whether the VM includes the kernel service in all modes (debug, release, |
| 72 | # product). |
| 73 | exclude_kernel_service = false |
Michael Goderbauer | d1a3eaa | 2018-09-25 23:58:57 +0000 | [diff] [blame] | 74 | |
| 75 | # Whether libdart should export the symbols of the Dart API. |
| 76 | dart_lib_export_symbols = true |
Tess Strickland | 2546ad2 | 2020-08-19 08:07:19 +0000 | [diff] [blame] | 77 | |
Liam Appelbe | f7eaaf2 | 2021-01-28 23:15:15 +0000 | [diff] [blame] | 78 | # Whether to use compressed pointers. |
| 79 | dart_use_compressed_pointers = false |
Ben Konyi | 9ff7ee6 | 2017-01-06 12:38:11 -0800 | [diff] [blame] | 80 | } |
asiva | d1bd887 | 2018-08-21 20:28:06 +0000 | [diff] [blame] | 81 | |
| 82 | declare_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 Markov | 43046b7 | 2019-04-05 22:31:58 +0000 | [diff] [blame] | 86 | if (dart_target_arch == "x64") { |
asiva | d1bd887 | 2018-08-21 20:28:06 +0000 | [diff] [blame] | 87 | create_kernel_service_snapshot = true |
| 88 | } else { |
| 89 | create_kernel_service_snapshot = false |
| 90 | } |
| 91 | } |