| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires | 5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires |
| 6 # some enhancements since the commands on Mac are slightly different than on | 6 # some enhancements since the commands on Mac are slightly different than on |
| 7 # Linux. | 7 # Linux. |
| 8 | 8 |
| 9 import("../goma.gni") | 9 import("../goma.gni") |
| 10 import("//build/config/ios/ios_sdk.gni") | 10 import("//build/config/ios/ios_sdk.gni") |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 template("mac_toolchain") { | 32 template("mac_toolchain") { |
| 33 toolchain(target_name) { | 33 toolchain(target_name) { |
| 34 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value") | 34 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value") |
| 35 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value") | 35 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value") |
| 36 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value") | 36 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value") |
| 37 assert(defined(invoker.toolchain_cpu), | 37 assert(defined(invoker.toolchain_cpu), |
| 38 "mac_toolchain() must specify a \"toolchain_cpu\"") | 38 "mac_toolchain() must specify a \"toolchain_cpu\"") |
| 39 assert(defined(invoker.toolchain_os), | 39 assert(defined(invoker.toolchain_os), |
| 40 "mac_toolchain() must specify a \"toolchain_os\"") | 40 "mac_toolchain() must specify a \"toolchain_os\"") |
| 41 | 41 |
| 42 # concurrent_links is picked up from the declare_arg(). |
| 43 |
| 42 # We can't do string interpolation ($ in strings) on things with dots in | 44 # We can't do string interpolation ($ in strings) on things with dots in |
| 43 # them. To allow us to use $cc below, for example, we create copies of | 45 # them. To allow us to use $cc below, for example, we create copies of |
| 44 # these values in our scope. | 46 # these values in our scope. |
| 45 cc = invoker.cc | 47 cc = invoker.cc |
| 46 cxx = invoker.cxx | 48 cxx = invoker.cxx |
| 47 ld = invoker.ld | 49 ld = invoker.ld |
| 48 | 50 |
| 49 # Make these apply to all tools below. | 51 # Make these apply to all tools below. |
| 50 lib_switch = "-l" | 52 lib_switch = "-l" |
| 51 lib_dir_switch = "-L" | 53 lib_dir_switch = "-L" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 352 } |
| 351 | 353 |
| 352 mac_toolchain("x64") { | 354 mac_toolchain("x64") { |
| 353 toolchain_cpu = "x64" | 355 toolchain_cpu = "x64" |
| 354 toolchain_os = "mac" | 356 toolchain_os = "mac" |
| 355 cc = "${goma_prefix}/gcc" | 357 cc = "${goma_prefix}/gcc" |
| 356 cxx = "${goma_prefix}/g++" | 358 cxx = "${goma_prefix}/g++" |
| 357 ld = cxx | 359 ld = cxx |
| 358 is_clang = false | 360 is_clang = false |
| 359 } | 361 } |
| OLD | NEW |