blob: 431cff050aba0cc6c918e3932faa3c0783ba7e44 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
# Whether to only warn when an SDK has been modified.
# If false, any unacknowledged SDK change will cause a build failure.
warn_on_sdk_changes = false
# Whether currently building a sub-build (vs. the main build).
# Can be true for any API level, including the default level.
sdk_inside_sub_build = false
# An upper bound on the maximum number of subbuilds that may be running at the
# same time. A larger number means these good things:
# - Better parallelization of the inherently single-threaded parts of GN and
# ninja.
# - Better parallelization in the face of "stragglers" in the build -
# situations where each subbuild is executing a small number of actions.
#
# But also these bad things:
# - More memory usage, potentially leading to swapping and slowdowns.
# - More CPU contention when the build process is actually CPU-bound.
# - Potentially forcing a lower value of `sdk_sub_build_parallelism`, since
# the total load is proportional to `sdk_max_simultaneous_sub_builds *
# sdk_sub_build_parallelism`.
#
# 5 was chosen mostly because it's the number of fingers on each of my hands.
sdk_max_simultaneous_sub_builds = 5
# Value of `-j` to pass to ninja during a subbuild. Note that up to
# `sdk_max_simultaneous_sub_builds` subbuilds may be happening in parallel, so
# the number of concurrent actions may go as high as this number times the
# number of concurrent subbuilds. If left blank, the subbuild script will make
# a guess.
sdk_sub_build_parallelism = ""
# Value of `-l` to pass to ninja during a subbuild. If the system load average
# on the system goes beyond this value, ninja will throttle itself. If left
# blank, the subbuild script will make a guess.
sdk_sub_build_max_load_average = ""
# Set to `true` to enable verbose logging during IDK subbuilds.
sdk_sub_build_verbose = false
# Overrides the set of target CPU architectures for which the build will
# provide build-time support in the IDK/SDK. The default (`false`) set is
# equivalent to `["arm64", "riscv64", "x64"]`. Other valid values are a list
# containing a subset of that list that includes the current `target_cpu.
#
# This is useful for reducing the overall build time of any build that
# includes the IDK/SDK in exchange for reduced coverage of target CPU
# architecture support. This includes `fx build final_fuchsia_idk`.
#
# To override the set of API levels, see
#`override_build_time_supported_api_levels`.
override_idk_target_cpus = false
}
# The list of all cpu architectures for the prebuilt Fuchsia binaries that are
# included in the IDK.
idk_target_cpus_default = [
"arm64",
"riscv64",
"x64",
]
idk_target_cpus = idk_target_cpus_default
if (override_idk_target_cpus != false) {
idk_target_cpus = []
idk_target_cpus = override_idk_target_cpus
}