You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.7 KiB
56 lines
1.7 KiB
# Copyright 2020 The Pigweed Authors
|
|
#
|
|
# 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
|
|
#
|
|
# https://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/pigweed.gni")
|
|
|
|
declare_args() {
|
|
# Default configs and dependencies targets provided by the toolchain. These
|
|
# are applied to all of the pw_* target types. They are set from a toolchain's
|
|
# toolchain_args for cross-toolchain deps, e.g. for
|
|
#
|
|
# `deps = [ //pw_some_module(//pw_toolchain:not_default) ]`
|
|
#
|
|
# The default toolchain is never used.
|
|
default_configs = []
|
|
default_public_deps = []
|
|
remove_default_configs = []
|
|
}
|
|
|
|
# Combine target-specifc and target-agnostic default variables.
|
|
_pw_build_defaults = {
|
|
configs = default_configs
|
|
public_deps = default_public_deps
|
|
|
|
# The target-agnostic defaults.
|
|
configs += [
|
|
"$dir_pw_build:colorize_output",
|
|
"$dir_pw_build:debugging",
|
|
"$dir_pw_build:reduced_size",
|
|
"$dir_pw_build:strict_warnings",
|
|
"$dir_pw_build:cpp17",
|
|
]
|
|
public_deps += [ "$dir_pw_polyfill:overrides" ]
|
|
}
|
|
|
|
# One more pass, to remove configs
|
|
pw_build_defaults = {
|
|
configs = []
|
|
forward_variables_from(_pw_build_defaults, "*")
|
|
if (remove_default_configs != []) {
|
|
# Add them first to ensure they are present to be removed.
|
|
configs += remove_default_configs
|
|
configs -= remove_default_configs
|
|
}
|
|
}
|