| 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 # This value will be inherited in the toolchain below. | 5 # This value will be inherited in the toolchain below. |
| 6 concurrent_links = exec_script("get_concurrent_links.py", [], "value") | 6 concurrent_links = exec_script("get_concurrent_links.py", [], "value") |
| 7 | 7 |
| 8 # This template defines a toolchain for something that works like gcc | 8 # This template defines a toolchain for something that works like gcc |
| 9 # (including clang). | 9 # (including clang). |
| 10 # | 10 # |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 depsformat = "gcc" | 109 depsformat = "gcc" |
| 110 description = "CXX {{output}}" | 110 description = "CXX {{output}}" |
| 111 outputs = [ | 111 outputs = [ |
| 112 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 112 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 113 ] | 113 ] |
| 114 } | 114 } |
| 115 | 115 |
| 116 tool("asm") { | 116 tool("asm") { |
| 117 # For GCC we can just use the C compiler to compile assembly. | 117 # For GCC we can just use the C compiler to compile assembly. |
| 118 depfile = "{{output}}.d" | 118 depfile = "{{output}}.d" |
| 119 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 119 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}}
-c {{source}} -o {{output}}" |
| 120 depsformat = "gcc" | 120 depsformat = "gcc" |
| 121 description = "ASM {{output}}" | 121 description = "ASM {{output}}" |
| 122 outputs = [ | 122 outputs = [ |
| 123 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 123 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 124 ] | 124 ] |
| 125 } | 125 } |
| 126 | 126 |
| 127 tool("alink") { | 127 tool("alink") { |
| 128 rspfile = "{{output}}.rsp" | 128 rspfile = "{{output}}.rsp" |
| 129 command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" | 129 command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 description = "STAMP {{output}}" | 225 description = "STAMP {{output}}" |
| 226 } | 226 } |
| 227 | 227 |
| 228 tool("copy") { | 228 tool("copy") { |
| 229 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &
& cp -af {{source}} {{output}})" | 229 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &
& cp -af {{source}} {{output}})" |
| 230 description = "COPY {{source}} {{output}}" | 230 description = "COPY {{source}} {{output}}" |
| 231 } | 231 } |
| 232 | 232 |
| 233 # When invoking this toolchain not as the default one, these args will be | 233 # When invoking this toolchain not as the default one, these args will be |
| 234 # passed to the build. They are ignored when this is the default toolchain. | 234 # passed to the build. They are ignored when this is the default toolchain. |
| 235 toolchain_args() { | 235 toolchain_args = { |
| 236 current_cpu = invoker.toolchain_cpu | 236 current_cpu = invoker.toolchain_cpu |
| 237 current_os = invoker.toolchain_os | 237 current_os = invoker.toolchain_os |
| 238 | 238 |
| 239 # These values need to be passed through unchanged. | 239 # These values need to be passed through unchanged. |
| 240 target_os = target_os | 240 target_os = target_os |
| 241 target_cpu = target_cpu | 241 target_cpu = target_cpu |
| 242 | 242 |
| 243 if (defined(invoker.is_clang)) { | 243 if (defined(invoker.is_clang)) { |
| 244 is_clang = invoker.is_clang | 244 is_clang = invoker.is_clang |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 if (defined(invoker.deps)) { | 248 if (defined(invoker.deps)) { |
| 249 deps = invoker.deps | 249 deps = invoker.deps |
| 250 } | 250 } |
| 251 } | 251 } |
| 252 } | 252 } |
| OLD | NEW |