blob: 619fa979c8faaef2227808b16a6659335c084242 [file] [log] [blame]
brettw@chromium.org45b211c2014-08-19 22:52:16 +00001# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
tsniatowskib1a19592015-11-02 02:50:05 -08005if (target_os == "") {
6 target_os = host_os
7}
8if (target_cpu == "") {
9 target_cpu = host_cpu
10}
11if (current_cpu == "") {
12 current_cpu = target_cpu
13}
14if (current_os == "") {
15 current_os = target_os
16}
17
Harley Li981f46c2020-06-03 10:33:23 -040018is_linux = host_os == "linux" && current_os == "linux" && target_os == "linux"
19is_mac = host_os == "mac" && current_os == "mac" && target_os == "mac"
20
brettw@chromium.org45b211c2014-08-19 22:52:16 +000021# All binary targets will get this list of configs by default.
scottmgfb9da232014-12-03 15:27:24 -080022_shared_binary_target_configs = [ "//build:compiler_defaults" ]
brettw@chromium.org45b211c2014-08-19 22:52:16 +000023
24# Apply that default list to the binary target types.
25set_defaults("executable") {
26 configs = _shared_binary_target_configs
scottmgfb9da232014-12-03 15:27:24 -080027
brettw@chromium.org45b211c2014-08-19 22:52:16 +000028 # Executables get this additional configuration.
29 configs += [ "//build:executable_ldconfig" ]
30}
31set_defaults("static_library") {
32 configs = _shared_binary_target_configs
33}
34set_defaults("shared_library") {
35 configs = _shared_binary_target_configs
36}
37set_defaults("source_set") {
38 configs = _shared_binary_target_configs
39}
40
41set_default_toolchain("//build/toolchain:gcc")