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") |
| 11 import("//build/config/mac/mac_sdk.gni") |
11 | 12 |
12 assert(host_os == "mac") | 13 assert(host_os == "mac") |
13 | 14 |
14 import("//build/toolchain/goma.gni") | 15 import("//build/toolchain/goma.gni") |
15 import("//build/toolchain/toolchain.gni") | 16 import("//build/toolchain/toolchain.gni") |
16 | 17 |
17 if (use_goma) { | 18 if (use_goma) { |
18 goma_prefix = "$goma_dir/gomacc " | 19 goma_prefix = "$goma_dir/gomacc " |
19 } else { | 20 } else { |
20 goma_prefix = "" | 21 goma_prefix = "" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 # See //build/toolchain/toolchain.gni for details. | 226 # See //build/toolchain/toolchain.gni for details. |
226 tool("stamp") { | 227 tool("stamp") { |
227 command = stamp_command | 228 command = stamp_command |
228 description = stamp_description | 229 description = stamp_description |
229 } | 230 } |
230 tool("copy") { | 231 tool("copy") { |
231 command = copy_command | 232 command = copy_command |
232 description = copy_description | 233 description = copy_description |
233 } | 234 } |
234 | 235 |
| 236 tool("copy_bundle_data") { |
| 237 command = "rm -rf {{output}} && " + |
| 238 "./gyp-mac-tool copy-bundle-resource {{source}} {{output}} True" |
| 239 description = "COPY_BUNDLE_DATA {{source}} {{output}}" |
| 240 } |
| 241 tool("compile_xcassets") { |
| 242 if (is_ios) { |
| 243 _configuration = "Release" |
| 244 if (is_debug) { |
| 245 _configuration = "Debug" |
| 246 } |
| 247 |
| 248 _compile_xcassets_env = |
| 249 "IPHONEOS_DEPLOYMENT_TARGET=$ios_deployment_target " + |
| 250 "CONFIGURATION=$ios_sdk_name-$_configuration " + |
| 251 "CONTENTS_FOLDER_PATH=\$(dirname {{output}})" |
| 252 } else { |
| 253 _compile_xcassets_env = |
| 254 "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target " + |
| 255 "UNLOCALIZED_RESOURCES_FOLDER_PATH=\$(dirname {{output}})" |
| 256 } |
| 257 |
| 258 command = "rm -f {{output}} && " + |
| 259 "env $_compile_xcassets_env ./gyp-mac-tool compile-xcassets " + |
| 260 "{} {{inputs}}" |
| 261 description = "COMPILE_XCASSETS {{output}}" |
| 262 } |
| 263 |
235 toolchain_args() { | 264 toolchain_args() { |
236 current_cpu = invoker.toolchain_cpu | 265 current_cpu = invoker.toolchain_cpu |
237 current_os = invoker.toolchain_os | 266 current_os = invoker.toolchain_os |
238 | 267 |
239 # These values need to be passed through unchanged. | 268 # These values need to be passed through unchanged. |
240 host_toolchain = host_toolchain | 269 host_toolchain = host_toolchain |
241 target_os = target_os | 270 target_os = target_os |
242 target_cpu = target_cpu | 271 target_cpu = target_cpu |
243 | 272 |
244 if (defined(invoker.is_clang)) { | 273 if (defined(invoker.is_clang)) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 324 } |
296 | 325 |
297 mac_toolchain("x64") { | 326 mac_toolchain("x64") { |
298 toolchain_cpu = "x64" | 327 toolchain_cpu = "x64" |
299 toolchain_os = "mac" | 328 toolchain_os = "mac" |
300 cc = "${goma_prefix}/gcc" | 329 cc = "${goma_prefix}/gcc" |
301 cxx = "${goma_prefix}/g++" | 330 cxx = "${goma_prefix}/g++" |
302 ld = cxx | 331 ld = cxx |
303 is_clang = false | 332 is_clang = false |
304 } | 333 } |
OLD | NEW |