• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 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 = "ios"
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
18# All binary targets will get this list of configs by default.
19_shared_binary_target_configs = [ "//build:compiler" ]
20
21# Apply that default list to the binary target types.
22set_defaults("executable") {
23  configs = _shared_binary_target_configs
24  configs += [ "//build:shared_binary" ]
25}
26set_defaults("static_library") {
27  configs = _shared_binary_target_configs
28}
29set_defaults("shared_library") {
30  configs = _shared_binary_target_configs
31  configs += [ "//build:shared_binary" ]
32}
33set_defaults("source_set") {
34  configs = _shared_binary_target_configs
35}
36
37set_default_toolchain("//build/toolchain/$target_os:clang_$target_cpu")
38
39if (target_os == "ios") {
40  host_toolchain = "//build/toolchain/$host_os:clang_$host_cpu"
41} else {
42  host_toolchain = default_toolchain
43}
44