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 18declare_args() { 19 # Control which platform the build is targeting. Valid values are 20 # "simulator" or "device". 21 target_environment = "simulator" 22} 23 24assert( 25 target_environment == "simulator" || target_environment == "device", 26 "Only supported values for target_environment are 'simulator' and 'device'") 27 28# All binary targets will get this list of configs by default. 29_shared_binary_target_configs = [ "//build:compiler" ] 30 31# Apply that default list to the binary target types. 32set_defaults("executable") { 33 configs = _shared_binary_target_configs 34 configs += [ "//build:shared_binary" ] 35} 36set_defaults("static_library") { 37 configs = _shared_binary_target_configs 38} 39set_defaults("shared_library") { 40 configs = _shared_binary_target_configs 41 configs += [ "//build:shared_binary" ] 42} 43set_defaults("source_set") { 44 configs = _shared_binary_target_configs 45} 46 47set_default_toolchain("//build/toolchain/$target_os:clang_$target_cpu") 48 49if (target_os == "ios") { 50 host_toolchain = "//build/toolchain/$host_os:clang_$host_cpu" 51} else { 52 host_toolchain = default_toolchain 53} 54