# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("wasm_vars.gni")

# Summary of our typical build configurations:

# 1. Standalone builds
#    build_with_chromium = false
#    is_perfetto_build_generator = false
#    perfetto_build_standalone = true
#    perfetto_build_with_android = false
#    perfetto_build_with_embedder = false

# 2. Android tree builds
#    build_with_chromium = false
#    is_perfetto_build_generator = true
#    perfetto_build_standalone = false
#    perfetto_build_with_android = true
#    perfetto_build_with_embedder = false

# 3. Chromium tree builds
#    build_with_chromium = true
#    is_perfetto_build_generator = false
#    perfetto_build_standalone = false
#    perfetto_build_with_android = false
#    perfetto_build_with_embedder = true

# 4. Builds in other embedder trees (e.g. V8 standalone)
#    build_with_chromium = false
#    is_perfetto_build_generator = false
#    perfetto_build_standalone = false
#    perfetto_build_with_android = false
#    perfetto_build_with_embedder = true

# 5. Amalgamated sources (Client library)
#    build_with_chromium = false
#    is_perfetto_build_generator = true
#    perfetto_build_standalone = false
#    perfetto_build_with_android = false
#    perfetto_build_with_embedder = true

# +----------------------------------------------------------------------------+
# | Toolchain / environment related configuration                              |
# +----------------------------------------------------------------------------+
# This section contains a bunch of variables that are related with the toolchain
# and the build environment. Only tools/gen_xxx should customize them.

# Note that |build_with_chromium| is a global convention used by several
# projects, set outside of our control.

# Chromium sets this to true in its //build_overrides/build.gni.
if (!defined(build_with_chromium)) {
  build_with_chromium = false
}

if (!defined(is_nacl)) {
  is_nacl = false
}

declare_args() {
  # The Android blueprint file generator set this to true (as well as
  # is_perfetto_build_generator). This is just about being built in the
  # Android tree (AOSP and internal) and is NOT related with the target OS.
  # In standalone Android builds and Chromium Android builds, this is false.
  perfetto_build_with_android = false

  # All the tools/gen_* scripts set this to true. This is mainly used to locate
  # .gni files from //gn rather than //build.
  is_perfetto_build_generator = false

  # This is for override via `gn args` (e.g. for tools/gen_xxx). Embedders
  # based on GN (e.g. v8) should NOT set this and instead directly sets
  # perfetto_build_with_embedder=true in their GN files.
  is_perfetto_embedder = false
}

# This can be overridden by embedders (e.g. v8) in their .gn(i) files. This must
# be different from the GN args flag (is_perfetto_embedder) because of the way
# GN works.
if (!defined(perfetto_build_with_embedder)) {
  perfetto_build_with_embedder = build_with_chromium || is_perfetto_embedder
}

perfetto_build_standalone =
    !perfetto_build_with_android && !build_with_chromium &&
    !perfetto_build_with_embedder

# Only relevant for GN builds. Sets the path where perfetto lives. This is //
# for standalone builds and //third_party/perfetto/ in embedders. The embedder
# can override it in its GN files.
if (perfetto_build_standalone || is_perfetto_build_generator) {
  perfetto_root_path = "//"
  import("//gn/standalone/android.gni")  # For android_api_level
  import("//gn/standalone/sanitizers/vars.gni")  # For is_fuzzer
} else if (!defined(perfetto_root_path)) {
  perfetto_root_path = "//third_party/perfetto/"
  import("//build/config/android/config.gni")  # For android_api_level
}

# Whether the ftrace producer and the service should be started
# by the integration test or assumed to be running.
# If we're building in the Android tree, we expect that the testing infra
# will start the binaries in the system image before the tests are run.
# In all other cases (i.e. when true), a temporary in-process instance will be
# brought up by our own integrationtest harness.
start_daemons_for_testing = !perfetto_build_with_android

# +----------------------------------------------------------------------------+
# | Tunable build variables for embedders                                      |
# +----------------------------------------------------------------------------+
# The variables in this section allow embedders to enable/disable features
# at the build-system level. This allows to opt-in into the various services
# and tools.

perfetto_force_dlog_default = ""
if (build_with_chromium) {
  perfetto_force_dlog_default = "off"
}

declare_args() {
  # Enables build of platform-wide tracing services (traced, traced_probes)
  # and executables (perfetto_cmd, trigger_perfetto).
  # When disabled, only the client library and other auxiliary tools can be
  # built (for Chromium and other GN embedders).
  # Note that traced_probes is further conditioned by the GN variable
  # enable_perfetto_traced_probes, in the declare_args() section below.
  enable_perfetto_platform_services =
      perfetto_build_standalone || perfetto_build_with_android

  # Allow the embedder to use the IPC layer. In turn this allows to use the
  # system backend in the client library.
  # This includes building things that rely on POSIX sockets, this places
  # limitations on the supported operating systems.
  # For now the IPC layer is conservatively not enabled on Chromium+Windows
  # builds.
  enable_perfetto_ipc =
      !is_nacl && (perfetto_build_standalone || perfetto_build_with_android ||
                   (build_with_chromium && !is_win) || is_fuchsia)

  # Makes the heap profiling daemon target reachable. It works only on Android,
  # but is built on Linux as well for test/compiler coverage.
  # On Android, it requires API level 26 due to libunwindstack.
  enable_perfetto_heapprofd =
      perfetto_build_with_android ||
      (perfetto_build_standalone && is_clang &&
       (is_linux || (is_android && android_api_level >= 26)))

  # Build the perf event profiler (traced_perf).
  # TODO(rsavitski): figure out how to make the android-core dependencies build
  # under gcc (_Atomic and other issues).
  enable_perfetto_traced_perf =
      perfetto_build_with_android ||
      (perfetto_build_standalone && is_clang &&
       (is_linux || (is_android && android_api_level >= 29)))

  # The Trace Processor: offline analytical engine to process traces and compute
  # metrics using a SQL engine.
  if (!defined(enable_perfetto_trace_processor)) {
    enable_perfetto_trace_processor =
        perfetto_build_standalone || build_with_chromium ||
        is_perfetto_build_generator
  }

  # Enables base::Watchdog. Is supported only on Linux-based platforms in
  # standalone GN builds (NOT in bazel/blaze).
  # gn/BUILD.gn further restricts this to OS_LINUX || OS_ANDROID when generating
  # the perfetto_build_flags.h header.
  enable_perfetto_watchdog =
      perfetto_build_with_android ||
      (perfetto_build_standalone && !is_perfetto_build_generator)

  # Misc host executable under tools/.
  enable_perfetto_tools =
      perfetto_build_standalone || perfetto_build_with_android

  enable_perfetto_unittests = perfetto_build_standalone ||
                              build_with_chromium || perfetto_build_with_android

  enable_perfetto_integration_tests =
      perfetto_build_standalone || perfetto_build_with_android

  enable_perfetto_benchmarks = perfetto_build_standalone && !is_win

  enable_perfetto_fuzzers =
      perfetto_build_standalone && defined(is_fuzzer) && is_fuzzer

  # Enables the write_version_header.py tool that generates a .h that contains a
  # macro with the current git revision and latest release version from
  # CHANGELOG. If false base/version.h will return "unknown".
  enable_perfetto_version_gen =
      perfetto_build_standalone || is_perfetto_build_generator ||
      perfetto_build_with_android

  # Only for local development. When true the binaries (perfetto, traced, ...)
  # are monolithic and don't use a common shared library. This is mainly to
  # avoid LD_LIBRARY_PATH dances when testing locally.
  # On Windows we default to monolithic executables, because pairing
  # dllexport/import adds extra complexity for little benefit. Te only reason
  # for monolithic_binaries=false is saving binary size, which matters mainly on
  # Android. See also comments on PERFETTO_EXPORT_ENTRYPOINT in compiler.h.
  monolithic_binaries = !perfetto_build_with_android && (is_win || is_mac)

  # Whether DLOG should be enabled on debug builds (""), all builds ("on"), or
  # none ("off"). We disable it by default for embedders to avoid spamming their
  # console.
  perfetto_force_dlog = perfetto_force_dlog_default

  # Whether DCHECKs should be enabled or not. Values: "on" | "off" | "".
  # By default ("") DCHECKs are enabled only:
  # - If DCHECK_ALWAYS_ON is defined (which is mainly a Chromium-ism).
  # - On debug builds (i.e. if NDEBUG is NOT defined) but only in Chromium,
  #   Android and standalone builds.
  # - On all other builds (e.g., SDK) it's off regardless of NDEBUG (unless
  #   DCHECK_ALWAYS_ON is defined).
  # See base/logging.h for the implementation of all this.
  perfetto_force_dcheck = ""

  # Installs a signal handler for the most common crash signals which unwinds
  # the stack and prints the stack trace on stderr. Requires a dependency on
  # libbacktrace when enabled.
  enable_perfetto_stderr_crash_dump =
      is_debug && perfetto_build_standalone && !is_wasm && !is_win

  # Enables more aggressive compiler flags that assume recent Intel CPUs.
  # Runtime checks during initialization will print an error message and exit
  # if the CPU doesn't support those flags.
  # Don't enable by default for MacOS. Old Intel Macs as used in CIs
  # etc don't have the fancy CPU instructions (i.e. AVX2) this implies.
  enable_perfetto_x64_cpu_opt =
      current_cpu == "x64" && is_linux && !is_wasm &&
      perfetto_build_standalone && !is_perfetto_build_generator
}

declare_args() {
  # When false, it disables system backend consumer support in the Perfetto SDK.
  # Saves ~300KB binary size.
  if (!defined(enable_perfetto_system_consumer)) {
    enable_perfetto_system_consumer = enable_perfetto_ipc
  }
}

declare_args() {
  perfetto_enable_git_rev_version_header =
      enable_perfetto_version_gen && perfetto_build_standalone &&
      !is_perfetto_build_generator

  # The traced_probes daemon is very Linux-specific, as it depends on ftrace and
  # various /proc interfaces. There is no point making its code platform-neutral
  # as it won't do anything useful on Windows.
  # The only reason why we still build it on Mac OS is to be able to run the
  # unittests there and making dev on mac less cumbersome. The traced_probes
  # code happens to build cleanly and for now the mainteinance cost on Mac is
  # extremely low.
  enable_perfetto_traced_probes = enable_perfetto_platform_services && !is_win

  # The relay service is enabled when platform services are enabled.
  # TODO(chinglinyu) check if we can enable on Windows.
  enable_perfetto_traced_relay = enable_perfetto_platform_services && !is_win

  # Whether info-level logging is enabled.
  perfetto_verbose_logs_enabled =
      !build_with_chromium || perfetto_force_dlog == "on"

  # Enables the SQL query layer of trace processor.
  enable_perfetto_trace_processor_sqlite =
      enable_perfetto_trace_processor &&
      (build_with_chromium || !perfetto_build_with_embedder)

  # Enables the optional SQLite percentile module.
  enable_perfetto_trace_processor_percentile =
      enable_perfetto_trace_processor &&
      (perfetto_build_standalone || perfetto_build_with_android)

  # Enables the REPL interactive prompt in the trace processor.
  enable_perfetto_trace_processor_linenoise =
      perfetto_build_standalone && enable_perfetto_trace_processor &&
      (is_linux || is_android || is_mac)

  # Enables JSON support in the trace processor. Required for JSON trace import
  # and export.
  enable_perfetto_trace_processor_json =
      enable_perfetto_trace_processor && !perfetto_build_with_android

  # Enables httpd RPC support in the trace processor.
  # Further per-OS conditionals are applied in gn/BUILD.gn.
  # Chromium+Win: httpd support depends on enable_perfetto_ipc, which is not
  # enabled on Chromium+Win for now (see a comment there).
  enable_perfetto_trace_processor_httpd =
      enable_perfetto_trace_processor &&
      (perfetto_build_standalone || perfetto_build_with_android ||
       (build_with_chromium && !is_win))

  # Enables Zlib support. This is used to compress traces (by the tracing
  # service and by the "perfetto" cmdline client) and to decompress traces (by
  # trace_processor).
  enable_perfetto_zlib =
      enable_perfetto_trace_processor || enable_perfetto_platform_services

  # Enables function name demangling using sources from llvm. Otherwise
  # trace_processor falls back onto using the c++ runtime demangler, which
  # typically handles only itanium mangling.
  # llvm-demangle is incompatible with GCC and can be used only when building
  # with clang.
  enable_perfetto_llvm_demangle =
      is_clang && enable_perfetto_trace_processor && perfetto_build_standalone

  # Enables gRPC in the Perfetto codebase. gRPC significantly increases build
  # times and the general footprint of Perfetto. As it only required for
  # BigTrace and even then only to build the final ready-to-ship binary, don't
  # enable this by default.
  enable_perfetto_grpc = false
}

declare_args() {
  # Enables the traceconv tool.
  enable_perfetto_traceconv =
      enable_perfetto_tools && enable_perfetto_trace_processor_sqlite

  # Allows to build the UI (TypeScript/ HTML / WASM)
  enable_perfetto_ui =
      perfetto_build_standalone && enable_perfetto_trace_processor_sqlite &&
      host_os != "win"

  # Allows to build the perfetto.dev website.
  # WARNING: if this flag is enabled, the build performs globbing at generation
  # time. Incremental builds that add/remove files will not be supported without
  # rerunning gn.
  enable_perfetto_site = false

  # Check that the merged perfetto_trace.proto can be translated to a C++ lite
  # proto and compiled. This is disabled by default because it's expensive (it
  # can take a couple of minutes).
  enable_perfetto_merged_protos_check = false

  # Skip buildtools dependency checks (needed for ChromeOS).
  skip_buildtools_check = false

  # Used by CrOS builds. Uses pkg-config to determine the appropriate flags
  # for including and linking system libraries.
  #   set `host_pkg_config` to the `BUILD_PKG_CONFIG` and
  #   set `pkg_config` to the target `PKG_CONFIG`.
  # Note: that if this is enabled `perfetto_use_system_protobuf` should be also.
  perfetto_use_pkgconfig = false

  # Used by CrOS system builds. Uses the system version of protobuf
  # from /usr/include instead of the hermetic one.
  perfetto_use_system_protobuf = false

  # Used by CrOS system builds. Uses the system version of sqlite
  # from /usr/include instead of the hermetic one.
  perfetto_use_system_sqlite = false

  perfetto_use_system_zlib = false
}

if (is_win) {
  # clang-cl
  perfetto_isystem_cflag = "/I"
} else {
  perfetto_isystem_cflag = "-isystem"
}

# +---------------------------------------------------------------------------+
# | Cross-checks                                                              |
# +---------------------------------------------------------------------------+

# Exactly one between build_with_android, build_standalone and
# build_with_embedder must be true.
assert(perfetto_build_standalone || perfetto_build_with_android ||
       perfetto_build_with_embedder)
assert(!(perfetto_build_with_android && perfetto_build_standalone))
assert(!(perfetto_build_with_embedder && perfetto_build_standalone))
assert(!(perfetto_build_with_android && perfetto_build_with_embedder))

# If |build_with_chromium| is true then also |perfetto_build_with_embedder|
# must be true
assert(!build_with_chromium || perfetto_build_with_embedder)

# If |perfetto_build_with_android| is true then also
# |is_perfetto_build_generator| must be true.
assert(!perfetto_build_with_android || is_perfetto_build_generator)

# We should never end up in a state where is_perfetto_embedder=true but
# perfetto_build_with_embedder=false.
assert(!is_perfetto_embedder || perfetto_build_with_embedder)

# The monolithic binaries is not supported when building in the Android tree.
assert(!monolithic_binaries || !perfetto_build_with_android)

# Watchdog must be on in Android builds.
assert(enable_perfetto_watchdog || !perfetto_build_with_android)

assert(perfetto_force_dlog == "" || perfetto_force_dlog == "on" ||
       perfetto_force_dlog == "off")

# If enable_perfetto_traced_probes is set, enable_perfetto_platform_services
# must be set as well. Doesn't make sense to build traced_probes without the
# rest. traced_probes integration tests depend on traced.
assert(!enable_perfetto_traced_probes || enable_perfetto_platform_services)

# |perfetto_use_pkgconfig| changes the behavior of
# |perfetto_use_system_protobuf|, so if perfetto_use_pkgconfig is set,
# |perfetto_use_system_protobuf| must be set.
assert(!perfetto_use_pkgconfig || perfetto_use_system_protobuf,
       "perfetto_use_pkgconfig requires perfetto_use_system_protobuf")
