blob: 47a887bbce83c31ef54babe5f9bea1e8041458cc [file] [log] [blame]
Alexei Frolove899dcf2019-11-13 14:49:14 -08001# Copyright 2019 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
Armando Montanez68de0712019-11-14 18:29:39 -080015# This is the target config to import when building for host. All this does is
16# import the appropriate target configuration for the current host OS.
17#
18# Due to GN-isms, lowest-precedence target variable definitions must be imported
19# at the deepest point. This causes the following structure:
20#
21# target_system.gni (e.g. Linux)
22# └ host_common.gni
23# └ pw_vars_default.gni
24#
25# This allows host_common to override variables defined in pw_vars_default,
26# and target_system to override defaults in host_common.
27
28# Load target-specific config file for a host desktop system.
Alexei Frolove899dcf2019-11-13 14:49:14 -080029if (host_os == "linux") {
30 import("linux.gni")
31} else if (host_os == "mac") {
32 import("macos.gni")
33} else if (host_os == "win") {
34 import("windows.gni")
35} else {
36 assert(false, "Please define a host config for your system: $host_os")
37}