• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 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
5if (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
18is_linux = host_os == "linux" && current_os == "linux" && target_os == "linux"
19is_mac = host_os == "mac" && current_os == "mac" && target_os == "mac"
20
21# All binary targets will get this list of configs by default.
22_shared_binary_target_configs = [ "//build:compiler_defaults" ]
23
24# Apply that default list to the binary target types.
25set_defaults("executable") {
26  configs = _shared_binary_target_configs
27
28  # 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")
42