blob: 6edd4d0d943bc02ea55d0352c1e26df3bd360911 [file] [log] [blame]
# Copyright 2016 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.
# This file directs GN to all the other key files.
# The location of the build configuration file.
buildconfig = "//build/config/"
# The secondary source root is a parallel directory tree where GN build files are placed when they
# can not be placed directly in the source tree, e.g. for third party source trees.
secondary_source = "//build/secondary/"
# The executable used to execute scripts in action and exec_script. This is often an interpreter for
# projects that use a primary scripting language. In this project, we use several different kinds of
# programs including scripts in different languages and native binaries. An empty script_executable
# string tells GN to directly run the "script".
script_executable = ""
# Require Ninja 1.10.0 to support multiple outputs from a rule with a depfile.
ninja_required_version = "1.10.0"
# Enable checking for all source code we control.
no_check_targets = [ "//third_party/*" ]
# Use of `exec_script()` is discouraged for performance reasons.
# See:
exec_script_whitelist = [
check_system_includes = true
# Causes a Clang compilation database to be written to $root_build_dir/compile_commands.json. It
# will contain the compilation commands for these patterns and all of their recursive dependencies.
export_compile_commands = [ "//:default" ]
# These arguments override the default values for items in a declare_args block. "gn args" in turn
# can override these.
# In general the value for a build arg in a declare_args block should be the default. In some
# cases, a third party dependency will want different defaults for being built as part of Fuchsia
# vs. being built standalone. In this case, the Fuchsia defaults should go here. There should be no
# overrides here for values declared in the main Fuchsia repository.
# Important note for defining defaults: This file is executed before the file. That
# file sets up the global variables like "target_os". This means that the default_args can not depend
# on the platform, architecture, or other build parameters. If you really need that, the other repo
# should define a flag that toggles on a behavior that implements the additional logic required by
# Fuchsia to set the variables.
default_args = {
# Limit the visibility of Pigweed modules to Pigweed integration files and Pigweed itself. Modules
# are allowlisted in //third_party/pigweed/ for use in Fuchsia.
pw_build_DEFAULT_VISIBILITY = [ "//third_party/pigweed/*" ]
# Specify Pigweed backends for Fuchsia.
pw_assert_BACKEND = "//third_party/pigweed/backends/pw_assert"
pw_log_BACKEND = "//third_party/pigweed/backends/pw_log"
# Pigweed configs for Fuchsia.
pw_function_CONFIG =
# Some Pigweed module implementations need to be link dependencies to avoid circular dependencies.
pw_build_LINK_DEPS = [
# Configures Pigweed to use Fuchsia's boringssl target.
pw_third_party_boringssl_ALIAS = "//third_party/boringssl"
# Configures Pigweed to use Fuchsia's Emboss checkout.
dir_pw_third_party_emboss = "//third_party/"
# Enable usage of the pw_async Pigweed module.
[ "//third_party/pigweed/backends/pw_async_fuchsia:*" ]
pw_async_TASK_BACKEND = "//third_party/pigweed/backends/pw_async_fuchsia:task"