Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import("//build_overrides/build.gni") |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 16 | import("wasm_vars.gni") |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 17 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 18 | # Summary of our typical build configurations: |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 19 | |
| 20 | # 1. Standalone builds |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 21 | # build_with_chromium = false |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 22 | # is_perfetto_build_generator = false |
| 23 | # perfetto_build_standalone = true |
| 24 | # perfetto_build_with_android = false |
| 25 | # perfetto_build_with_embedder = false |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 26 | |
| 27 | # 2. Android tree builds |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 28 | # build_with_chromium = false |
| 29 | # is_perfetto_build_generator = true |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 30 | # perfetto_build_standalone = false |
| 31 | # perfetto_build_with_android = true |
| 32 | # perfetto_build_with_embedder = false |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 33 | |
| 34 | # 3. Chromium tree builds |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 35 | # build_with_chromium = true |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 36 | # is_perfetto_build_generator = false |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 37 | # perfetto_build_standalone = false |
| 38 | # perfetto_build_with_android = false |
| 39 | # perfetto_build_with_embedder = true |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 40 | |
| 41 | # 4. Builds in other embedder trees (e.g. V8 standalone) |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 42 | # build_with_chromium = false |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 43 | # is_perfetto_build_generator = false |
| 44 | # perfetto_build_standalone = false |
| 45 | # perfetto_build_with_android = false |
| 46 | # perfetto_build_with_embedder = true |
| 47 | |
| 48 | # 5. Amalgamated sources (Client library) |
| 49 | # build_with_chromium = false |
| 50 | # is_perfetto_build_generator = true |
| 51 | # perfetto_build_standalone = false |
| 52 | # perfetto_build_with_android = false |
| 53 | # perfetto_build_with_embedder = true |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 54 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 55 | # +----------------------------------------------------------------------------+ |
| 56 | # | Toolchain / environment related configuration | |
| 57 | # +----------------------------------------------------------------------------+ |
| 58 | # This section contains a bunch of variables that are related with the toolchain |
| 59 | # and the build environment. Only tools/gen_xxx should customize them. |
| 60 | |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 61 | # Note that |build_with_chromium| is a global convention used by several |
| 62 | # projects, set outside of our control. |
| 63 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 64 | # Chromium sets this to true in its //build_overrides/build.gni. |
Eric Seckler | 7faef11 | 2019-01-16 15:07:50 +0000 | [diff] [blame] | 65 | if (!defined(build_with_chromium)) { |
| 66 | build_with_chromium = false |
| 67 | } |
| 68 | |
Stephen Nusko | 036d198 | 2020-01-22 13:10:37 +0000 | [diff] [blame] | 69 | if (!defined(is_nacl)) { |
| 70 | is_nacl = false |
| 71 | } |
| 72 | |
Eric Seckler | 357966a | 2019-01-15 13:45:37 +0000 | [diff] [blame] | 73 | declare_args() { |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 74 | # The Android blueprint file generator set this to true (as well as |
| 75 | # is_perfetto_build_generator). This is just about being built in the |
| 76 | # Android tree (AOSP and internal) and is NOT related with the target OS. |
| 77 | # In standalone Android builds and Chromium Android builds, this is false. |
| 78 | perfetto_build_with_android = false |
| 79 | |
| 80 | # All the tools/gen_* scripts set this to true. This is mainly used to locate |
| 81 | # .gni files from //gn rather than //build. |
| 82 | is_perfetto_build_generator = false |
| 83 | |
| 84 | # This is for override via `gn args` (e.g. for tools/gen_xxx). Embedders |
| 85 | # based on GN (e.g. v8) should NOT set this and instead directly sets |
| 86 | # perfetto_build_with_embedder=true in their GN files. |
| 87 | is_perfetto_embedder = false |
Eric Seckler | 357966a | 2019-01-15 13:45:37 +0000 | [diff] [blame] | 88 | } |
| 89 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 90 | # This can be overridden by embedders (e.g. v8) in their .gn(i) files. This must |
| 91 | # be different from the GN args flag (is_perfetto_embedder) because of the way |
| 92 | # GN works. |
| 93 | if (!defined(perfetto_build_with_embedder)) { |
| 94 | perfetto_build_with_embedder = build_with_chromium || is_perfetto_embedder |
| 95 | } |
| 96 | |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 97 | perfetto_build_standalone = |
| 98 | !perfetto_build_with_android && !build_with_chromium && |
| 99 | !perfetto_build_with_embedder |
| 100 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 101 | # Only relevant for GN builds. Sets the path where perfetto lives. This is // |
| 102 | # for standalone builds and //third_party/perfetto/ in embedders. The embedder |
| 103 | # can ovverride it in its GN files. |
| 104 | if (perfetto_build_standalone || is_perfetto_build_generator) { |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 105 | perfetto_root_path = "//" |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 106 | import("//gn/standalone/android.gni") # For android_api_level |
| 107 | import("//gn/standalone/sanitizers/vars.gni") # For is_fuzzer |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 108 | } else if (!defined(perfetto_root_path)) { |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 109 | perfetto_root_path = "//third_party/perfetto/" |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 110 | import("//build/config/android/config.gni") # For android_api_level |
Oystein Eftevaag | dd727e4 | 2017-12-05 08:49:55 -0800 | [diff] [blame] | 111 | } |
Lalit Maganti | d0e7679 | 2018-02-12 14:25:01 +0000 | [diff] [blame] | 112 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 113 | # Whether the ftrace producer and the service should be started |
| 114 | # by the integration test or assumed to be running. |
Lalit Maganti | d0e7679 | 2018-02-12 14:25:01 +0000 | [diff] [blame] | 115 | # If we're building in the Android tree, we expect that the testing infra |
| 116 | # will start the binaries in the system image before the tests are run. |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 117 | # In all other cases (i.e. when true), a temporary in-process instance will be |
| 118 | # brought up by our own integrationtest harness. |
| 119 | start_daemons_for_testing = !perfetto_build_with_android |
| 120 | |
| 121 | # +----------------------------------------------------------------------------+ |
| 122 | # | Tunable build variables for embedders | |
| 123 | # +----------------------------------------------------------------------------+ |
| 124 | # The variables in this section allow embedders to enable/disable features |
| 125 | # at the build-system level. This allows to opt-in into the various services |
| 126 | # and tools. |
| 127 | |
| 128 | perfetto_force_dlog_default = "" |
| 129 | if (build_with_chromium) { |
| 130 | perfetto_force_dlog_default = "off" |
Lalit Maganti | d0e7679 | 2018-02-12 14:25:01 +0000 | [diff] [blame] | 131 | } |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 132 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 133 | declare_args() { |
| 134 | # Platform-wide tracing executables (traced, traced_probes, perfetto_cmd). |
| 135 | enable_perfetto_platform_services = |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 136 | (perfetto_build_standalone && !is_win) || perfetto_build_with_android |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 137 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 138 | # Allow the embedder to use the IPC layer. In turn this allows to use the |
| 139 | # system backend in the client library. |
| 140 | # This includes building things that rely on POSIX sockets, this places |
| 141 | # limitations on the supported operating systems. |
Stephen Nusko | 036d198 | 2020-01-22 13:10:37 +0000 | [diff] [blame] | 142 | enable_perfetto_ipc = !is_win && !is_fuchsia && !is_nacl && |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 143 | (perfetto_build_standalone || |
| 144 | perfetto_build_with_android || build_with_chromium) |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 145 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 146 | # Makes the heap profiling daemon target reachable. It works only on Android, |
| 147 | # but is built on Linux as well for test/compiler coverage. |
| 148 | # On Android, it requires API level 26 due to libunwindstack. |
| 149 | enable_perfetto_heapprofd = |
| 150 | perfetto_build_with_android || |
| 151 | (perfetto_build_standalone && is_clang && |
| 152 | (is_linux || (is_android && android_api_level >= 26))) |
| 153 | |
Ryan Savitski | a76b3cc | 2019-11-20 16:25:24 +0000 | [diff] [blame] | 154 | # Build the perf event profiler (traced_perf). |
| 155 | # TODO(b/144281346): under development. |
Ryan Savitski | 56bc0c6 | 2020-01-27 13:50:02 +0000 | [diff] [blame] | 156 | # TODO(rsavitski): figure out how to make the android-core dependencies build |
| 157 | # under gcc (_Atomic and other issues). |
| 158 | enable_perfetto_traced_perf = |
| 159 | perfetto_build_with_android || |
| 160 | (perfetto_build_standalone && is_clang && is_linux) |
Ryan Savitski | a76b3cc | 2019-11-20 16:25:24 +0000 | [diff] [blame] | 161 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 162 | # The Trace Processor: offline analytical engine to process traces and compute |
| 163 | # metrics using a SQL engine. |
Sami Kyostila | 413b643 | 2020-02-04 17:52:12 +0000 | [diff] [blame] | 164 | if (!defined(enable_perfetto_trace_processor)) { |
| 165 | enable_perfetto_trace_processor = |
| 166 | perfetto_build_standalone || build_with_chromium || |
| 167 | is_perfetto_build_generator |
| 168 | } |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 169 | |
| 170 | # Enables base::Watchdog. Is supported only on Linux-based platforms. |
Primiano Tucci | 18c0cff | 2019-09-09 17:09:03 -0700 | [diff] [blame] | 171 | # gn/BUILD.gn further restricts this to OS_LINUX || OS_ANDROID when generating |
| 172 | # the perfetto_build_flags.h header. |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 173 | enable_perfetto_watchdog = |
Primiano Tucci | 18c0cff | 2019-09-09 17:09:03 -0700 | [diff] [blame] | 174 | perfetto_build_with_android || perfetto_build_standalone |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 175 | |
| 176 | # Misc host executable under tools/. |
| 177 | enable_perfetto_tools = |
Primiano Tucci | f33540e | 2019-09-19 12:35:57 +0100 | [diff] [blame] | 178 | perfetto_build_standalone || perfetto_build_with_android |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 179 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 180 | enable_perfetto_unittests = perfetto_build_standalone || |
| 181 | build_with_chromium || perfetto_build_with_android |
| 182 | |
| 183 | enable_perfetto_integration_tests = |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 184 | (perfetto_build_standalone && !is_win) || perfetto_build_with_android |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 185 | |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 186 | enable_perfetto_benchmarks = perfetto_build_standalone && !is_win |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 187 | |
| 188 | enable_perfetto_fuzzers = |
| 189 | perfetto_build_standalone && defined(is_fuzzer) && is_fuzzer |
| 190 | |
Primiano Tucci | ec59013 | 2020-11-16 14:16:44 +0100 | [diff] [blame] | 191 | # Enables the write_version_header.py tool that generates a .h that contains a |
| 192 | # macro with the current git revision and latest release version from |
| 193 | # CHANGELOG. If false base/version.h will return "unknown". |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 194 | enable_perfetto_version_gen = |
Primiano Tucci | ec59013 | 2020-11-16 14:16:44 +0100 | [diff] [blame] | 195 | perfetto_build_standalone || is_perfetto_build_generator || |
| 196 | perfetto_build_with_android |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 197 | |
| 198 | # Only for local development. When true the binaries (perfetto, traced, ...) |
| 199 | # are monolithic and don't use a common shared library. This is mainly to |
| 200 | # avoid LD_LIBRARY_PATH dances when testing locally. |
| 201 | monolithic_binaries = false |
| 202 | |
| 203 | # Whether DLOG should be enabled on debug builds (""), all builds ("on"), or |
| 204 | # none ("off"). We disable it by default for embedders to avoid spamming their |
| 205 | # console. |
| 206 | perfetto_force_dlog = perfetto_force_dlog_default |
Primiano Tucci | 824be14 | 2020-07-08 16:15:44 +0100 | [diff] [blame] | 207 | |
| 208 | # Installs a signal handler for the most common crash signals which unwinds |
| 209 | # the stack and prints the stack trace on stderr. Requires a dependency on |
| 210 | # libbacktrace when enabled. |
| 211 | enable_perfetto_stderr_crash_dump = |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 212 | is_debug && perfetto_build_standalone && !is_wasm && !is_win |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | declare_args() { |
Eric Seckler | 0846048 | 2019-12-16 17:40:21 +0000 | [diff] [blame] | 216 | # Whether info-level logging is enabled. |
| 217 | perfetto_verbose_logs_enabled = |
| 218 | !build_with_chromium || perfetto_force_dlog == "on" |
| 219 | |
Mikhail Khokhlov | 0f7e68d | 2020-01-16 15:39:27 +0000 | [diff] [blame] | 220 | # Enables the SQL query layer of trace processor. |
| 221 | enable_perfetto_trace_processor_sqlite = |
| 222 | enable_perfetto_trace_processor && |
| 223 | (build_with_chromium || !perfetto_build_with_embedder) |
| 224 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 225 | # Enables the optional SQLite percentile module. |
| 226 | enable_perfetto_trace_processor_percentile = |
| 227 | enable_perfetto_trace_processor && perfetto_build_standalone |
| 228 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 229 | # Enables the REPL interactive prompt in the trace processor. |
| 230 | enable_perfetto_trace_processor_linenoise = |
| 231 | perfetto_build_standalone && enable_perfetto_trace_processor && |
| 232 | (is_linux || is_android || is_mac) |
Eric Seckler | de58995 | 2019-10-17 12:46:07 +0100 | [diff] [blame] | 233 | |
Eric Seckler | 510a3ee | 2019-11-01 13:23:24 +0000 | [diff] [blame] | 234 | # Enables JSON support in the trace processor. Required for JSON trace import |
Lalit Maganti | 6d1f7b5 | 2020-02-27 13:16:44 +0000 | [diff] [blame] | 235 | # and export. |
Eric Seckler | de58995 | 2019-10-17 12:46:07 +0100 | [diff] [blame] | 236 | enable_perfetto_trace_processor_json = |
| 237 | enable_perfetto_trace_processor && !perfetto_build_with_android |
Eric Seckler | ac2ea61 | 2019-10-21 16:44:39 +0100 | [diff] [blame] | 238 | |
Primiano Tucci | a36cccc | 2019-10-27 13:15:04 +0100 | [diff] [blame] | 239 | # Enables httpd RPC support in the trace processor. |
| 240 | # Further per-OS conditionals are applied in gn/BUILD.gn. |
| 241 | enable_perfetto_trace_processor_httpd = |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 242 | enable_perfetto_trace_processor && perfetto_build_standalone && !is_win |
Primiano Tucci | 1b5fdae | 2020-01-16 09:28:05 +0000 | [diff] [blame] | 243 | |
| 244 | # Enables Zlib support. This is used both by the "perfetto" cmdline client |
| 245 | # (for compressing traces) and by trace processor (for compressed traces). |
| 246 | enable_perfetto_zlib = |
| 247 | enable_perfetto_trace_processor || enable_perfetto_platform_services |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 248 | } |
| 249 | |
Eric Seckler | a7870e6 | 2019-11-01 10:11:58 +0000 | [diff] [blame] | 250 | declare_args() { |
| 251 | # Enables the trace_to_text tool. |
Mikhail Khokhlov | 0f7e68d | 2020-01-16 15:39:27 +0000 | [diff] [blame] | 252 | enable_perfetto_tools_trace_to_text = |
| 253 | enable_perfetto_tools && enable_perfetto_trace_processor_sqlite |
Eric Seckler | a7870e6 | 2019-11-01 10:11:58 +0000 | [diff] [blame] | 254 | |
| 255 | # Allows to build the UI (TypeScript/ HTML / WASM) |
Mikhail Khokhlov | 0f7e68d | 2020-01-16 15:39:27 +0000 | [diff] [blame] | 256 | enable_perfetto_ui = |
Primiano Tucci | 42433ab | 2020-11-30 18:42:01 +0100 | [diff] [blame] | 257 | perfetto_build_standalone && enable_perfetto_trace_processor_sqlite && |
| 258 | host_os != "win" |
Joel Fernandes | 090d271 | 2020-02-24 13:53:27 -0500 | [diff] [blame] | 259 | |
| 260 | # Skip buildtools dependency checks (needed for ChromeOS). |
| 261 | skip_buildtools_check = false |
Joel Fernandes | 80fc3cd | 2020-04-01 18:02:57 -0400 | [diff] [blame] | 262 | |
| 263 | # Used by CrOS system builds. Uses the system version of protobuf |
| 264 | # from /usr/include instead of the hermetic one. |
| 265 | perfetto_use_system_protobuf = false |
Eric Seckler | a7870e6 | 2019-11-01 10:11:58 +0000 | [diff] [blame] | 266 | } |
| 267 | |
Primiano Tucci | 2f81155 | 2020-12-07 16:48:22 +0100 | [diff] [blame^] | 268 | if (is_win) { |
| 269 | # clang-cl |
| 270 | perfetto_isystem_cflag = "/I" |
| 271 | } else { |
| 272 | perfetto_isystem_cflag = "-isystem" |
| 273 | } |
| 274 | |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 275 | # +---------------------------------------------------------------------------+ |
| 276 | # | Cross-checks | |
| 277 | # +---------------------------------------------------------------------------+ |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 278 | |
Primiano Tucci | 7c7f5f5 | 2019-01-15 21:47:04 +0000 | [diff] [blame] | 279 | # Exactly one between build_with_android, build_standalone and |
| 280 | # build_with_embedder must be true. |
| 281 | assert(perfetto_build_standalone || perfetto_build_with_android || |
| 282 | perfetto_build_with_embedder) |
| 283 | assert(!(perfetto_build_with_android && perfetto_build_standalone)) |
| 284 | assert(!(perfetto_build_with_embedder && perfetto_build_standalone)) |
| 285 | assert(!(perfetto_build_with_android && perfetto_build_with_embedder)) |
| 286 | |
Primiano Tucci | 4c5efa4 | 2018-10-23 13:15:13 +0100 | [diff] [blame] | 287 | # If |build_with_chromium| is true then also |perfetto_build_with_embedder| |
| 288 | # must be true |
| 289 | assert(!build_with_chromium || perfetto_build_with_embedder) |
Stephen Nusko | 5da63f3 | 2019-04-25 17:06:26 +0100 | [diff] [blame] | 290 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 291 | # If |perfetto_build_with_android| is true then also |
| 292 | # |is_perfetto_build_generator| must be true. |
| 293 | assert(!perfetto_build_with_android || is_perfetto_build_generator) |
Primiano Tucci | 2bf8284 | 2019-08-27 07:10:55 +0200 | [diff] [blame] | 294 | |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 295 | # The IPC layer based on UNIX sockets can't be built on Win. |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 296 | assert(!enable_perfetto_ipc || !is_win) |
Primiano Tucci | 7e05fc1 | 2019-08-27 17:29:47 +0200 | [diff] [blame] | 297 | |
| 298 | # We should never end up in a state where is_perfetto_embedder=true but |
| 299 | # perfetto_build_with_embedder=false. |
| 300 | assert(!is_perfetto_embedder || perfetto_build_with_embedder) |
Primiano Tucci | 02c1176 | 2019-08-30 00:57:59 +0200 | [diff] [blame] | 301 | |
| 302 | # The monolithic binaries is not supported when building in the Android tree. |
| 303 | assert(!monolithic_binaries || !perfetto_build_with_android) |
| 304 | |
| 305 | # Watchdog must be on in Android builds. |
| 306 | assert(enable_perfetto_watchdog || !perfetto_build_with_android) |
| 307 | |
| 308 | assert(perfetto_force_dlog == "" || perfetto_force_dlog == "on" || |
| 309 | perfetto_force_dlog == "off") |