blob: 3e06d60f41add8c6edb6f882696da39d2332721f [file] [log] [blame]
# 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")
# Summary of our build configurations:
# 1. Standalone builds
# perfetto_build_standalone = true
# perfetto_build_with_embedder = false
# perfetto_build_with_android = false
# build_with_chromium = false
# 2. Android tree builds
# perfetto_build_standalone = false
# perfetto_build_with_android = true
# perfetto_build_with_embedder = false
# build_with_chromium = false
# 3. Chromium tree builds
# perfetto_build_standalone = false
# perfetto_build_with_android = false
# perfetto_build_with_embedder = true
# build_with_chromium = true
# 4. Builds in other embedder trees
# perfetto_build_standalone = false
# perfetto_build_with_android = false
# perfetto_build_with_embedder = true
# build_with_chromium = false
# Note that |build_with_chromium| is a global convention used by several
# projects, set outside of our control.
declare_args() {
# The Android blueprint file generator overrides this to true.
perfetto_build_with_android = false
# Whether the ftrace producer and the service should be started
# by the integration test or assumed to be running.
start_daemons_for_testing = true
}
if (!defined(perfetto_build_with_embedder)) {
perfetto_build_with_embedder = build_with_chromium
}
perfetto_build_standalone =
!perfetto_build_with_android && !build_with_chromium &&
!perfetto_build_with_embedder
if (perfetto_build_standalone || perfetto_build_with_android) {
perfetto_root_path = "//"
} else if (!defined(perfetto_root_path)) {
perfetto_root_path = "//third_party/perfetto/"
}
# 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.
if (perfetto_build_with_android) {
start_daemons_for_testing = false
}
# Cross-checks.
# If |build_with_chromium| is true then also |perfetto_build_with_embedder|
# must be true
assert(!build_with_chromium || perfetto_build_with_embedder)