| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/compiler/compiler.gni") | 5 import("//build/config/compiler/compiler.gni") |
| 6 import("//build/config/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
| 7 import("//build/toolchain/gcc_toolchain.gni") | 7 import("//build/toolchain/gcc_toolchain.gni") |
| 8 import("//build/toolchain/cros_toolchain.gni") | 8 import("//build/toolchain/cros_toolchain.gni") |
| 9 | 9 |
| 10 # This is the normal toolchain for most targets. | 10 # This is the normal toolchain for most targets. |
| 11 gcc_toolchain("target") { | 11 gcc_toolchain("target") { |
| 12 ar = cros_target_ar | 12 ar = cros_target_ar |
| 13 cc = cros_target_cc | 13 cc = cros_target_cc |
| 14 cxx = cros_target_cxx | 14 cxx = cros_target_cxx |
| 15 ld = cxx | 15 ld = cxx |
| 16 if (cros_target_ld != "") { | 16 if (cros_target_ld != "") { |
| 17 ld = cros_target_ld | 17 ld = cros_target_ld |
| 18 } | 18 } |
| 19 if (cros_target_nm != "") { | 19 if (cros_target_nm != "") { |
| 20 nm = cros_target_nm | 20 nm = cros_target_nm |
| 21 } | 21 } |
| 22 if (cros_target_readelf != "") { | 22 if (cros_target_readelf != "") { |
| 23 readelf = cros_target_readelf | 23 readelf = cros_target_readelf |
| 24 } | 24 } |
| 25 if (cc_wrapper != "") { |
| 26 print("cc_wrapper is not supported on target build. crbug.com/645435") |
| 27 } |
| 25 extra_cflags = cros_target_extra_cflags | 28 extra_cflags = cros_target_extra_cflags |
| 26 extra_cppflags = cros_target_extra_cppflags | 29 extra_cppflags = cros_target_extra_cppflags |
| 27 extra_cxxflags = cros_target_extra_cxxflags | 30 extra_cxxflags = cros_target_extra_cxxflags |
| 28 extra_ldflags = cros_target_extra_ldflags | 31 extra_ldflags = cros_target_extra_ldflags |
| 29 | 32 |
| 30 toolchain_args = { | 33 toolchain_args = { |
| 31 cc_wrapper = "" | 34 cc_wrapper = "" |
| 32 current_cpu = target_cpu | 35 current_cpu = target_cpu |
| 33 current_os = "chromeos" | 36 current_os = "chromeos" |
| 34 is_clang = is_clang | 37 is_clang = is_clang |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 current_cpu = target_cpu | 69 current_cpu = target_cpu |
| 67 current_os = "chromeos" | 70 current_os = "chromeos" |
| 68 is_clang = is_clang | 71 is_clang = is_clang |
| 69 use_debug_fission = false | 72 use_debug_fission = false |
| 70 use_gold = false | 73 use_gold = false |
| 71 use_sysroot = false | 74 use_sysroot = false |
| 72 } | 75 } |
| 73 } | 76 } |
| 74 | 77 |
| 75 gcc_toolchain("host") { | 78 gcc_toolchain("host") { |
| 79 if (cc_wrapper != "") { |
| 80 compiler_prefix = cc_wrapper + " " |
| 81 } else { |
| 82 compiler_prefix = "" |
| 83 } |
| 84 |
| 76 # These are args for the template. | 85 # These are args for the template. |
| 77 ar = cros_host_ar | 86 ar = cros_host_ar |
| 78 cc = cros_host_cc | 87 cc = compiler_prefix + cros_host_cc |
| 79 cxx = cros_host_cxx | 88 cxx = compiler_prefix + cros_host_cxx |
| 80 ld = cxx | 89 ld = cxx |
| 81 if (cros_host_ld != "") { | 90 if (cros_host_ld != "") { |
| 82 ld = cros_host_ld | 91 ld = cros_host_ld |
| 83 } | 92 } |
| 84 if (cros_host_nm != "") { | 93 if (cros_host_nm != "") { |
| 85 nm = cros_host_nm | 94 nm = cros_host_nm |
| 86 } | 95 } |
| 87 if (cros_host_readelf != "") { | 96 if (cros_host_readelf != "") { |
| 88 readelf = cros_host_readelf | 97 readelf = cros_host_readelf |
| 89 } | 98 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") { | 136 if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") { |
| 128 current_cpu = "x86" | 137 current_cpu = "x86" |
| 129 } else { | 138 } else { |
| 130 current_cpu = "x64" | 139 current_cpu = "x64" |
| 131 } | 140 } |
| 132 v8_current_cpu = v8_target_cpu | 141 v8_current_cpu = v8_target_cpu |
| 133 current_os = "linux" | 142 current_os = "linux" |
| 134 use_sysroot = false | 143 use_sysroot = false |
| 135 } | 144 } |
| 136 } | 145 } |
| OLD | NEW |