| 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/clang/clang.gni") | 10 import("//build/config/clang/clang.gni") | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 130     lib_switch = "-l" | 130     lib_switch = "-l" | 
| 131     lib_dir_switch = "-L" | 131     lib_dir_switch = "-L" | 
| 132 | 132 | 
| 133     # Object files go in this directory. Use label_name instead of | 133     # Object files go in this directory. Use label_name instead of | 
| 134     # target_output_name since labels will generally have no spaces and will be | 134     # target_output_name since labels will generally have no spaces and will be | 
| 135     # unique in the directory. | 135     # unique in the directory. | 
| 136     object_subdir = "{{target_out_dir}}/{{label_name}}" | 136     object_subdir = "{{target_out_dir}}/{{label_name}}" | 
| 137 | 137 | 
| 138     # If dSYMs are enabled, this flag will be added to the link tools. | 138     # If dSYMs are enabled, this flag will be added to the link tools. | 
| 139     if (_enable_dsyms) { | 139     if (_enable_dsyms) { | 
| 140       dsym_switch = " -Wcrl,dsym,{{root_out_dir}} " | 140       dsym_switch = " -Wcrl,dsym,{{output_dir}} " | 
| 141       dsym_output_dir = | 141       dsym_output_dir = | 
| 142           "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM" | 142           "{{output_dir}}/{{target_output_name}}{{output_extension}}.dSYM" | 
| 143       dsym_output = [ | 143       dsym_output = [ | 
| 144         "$dsym_output_dir/", | 144         "$dsym_output_dir/", | 
| 145         "$dsym_output_dir/Contents/Info.plist", | 145         "$dsym_output_dir/Contents/Info.plist", | 
| 146         "$dsym_output_dir/Contents/Resources/DWARF/" + | 146         "$dsym_output_dir/Contents/Resources/DWARF/" + | 
| 147             "{{target_output_name}}{{output_extension}}", | 147             "{{target_output_name}}{{output_extension}}", | 
| 148       ] | 148       ] | 
| 149     } else { | 149     } else { | 
| 150       dsym_switch = "" | 150       dsym_switch = "" | 
| 151     } | 151     } | 
| 152 | 152 | 
| 153     if (_save_unstripped_output) { | 153     if (_save_unstripped_output) { | 
| 154       _unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_exte
     nsion}}.unstripped" | 154       _unstripped_output = | 
|  | 155           "{{output_dir}}/{{target_output_name}}{{output_extension}}.unstripped" | 
| 155     } | 156     } | 
| 156 | 157 | 
| 157     tool("cc") { | 158     tool("cc") { | 
| 158       depfile = "{{output}}.d" | 159       depfile = "{{output}}.d" | 
| 159       precompiled_header_type = "gcc" | 160       precompiled_header_type = "gcc" | 
| 160       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
     {cflags_c}} -c {{source}} -o {{output}}" | 161       command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
     {cflags_c}} -c {{source}} -o {{output}}" | 
| 161       depsformat = "gcc" | 162       depsformat = "gcc" | 
| 162       description = "CC {{output}}" | 163       description = "CC {{output}}" | 
| 163       outputs = [ | 164       outputs = [ | 
| 164         "$object_subdir/{{source_name_part}}.o", | 165         "$object_subdir/{{source_name_part}}.o", | 
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 447     } | 448     } | 
| 448   } | 449   } | 
| 449 | 450 | 
| 450   mac_toolchain("ios_clang_x64") { | 451   mac_toolchain("ios_clang_x64") { | 
| 451     toolchain_args = { | 452     toolchain_args = { | 
| 452       current_cpu = "x64" | 453       current_cpu = "x64" | 
| 453       current_os = "ios" | 454       current_os = "ios" | 
| 454     } | 455     } | 
| 455   } | 456   } | 
| 456 } | 457 } | 
| OLD | NEW | 
|---|