| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 # These library switches can apply to all tools below. | 88 # These library switches can apply to all tools below. |
| 89 lib_switch = "-l" | 89 lib_switch = "-l" |
| 90 lib_dir_switch = "-L" | 90 lib_dir_switch = "-L" |
| 91 | 91 |
| 92 tool("cc") { | 92 tool("cc") { |
| 93 depfile = "{{output}}.d" | 93 depfile = "{{output}}.d" |
| 94 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 94 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
| 95 depsformat = "gcc" | 95 depsformat = "gcc" |
| 96 description = "CC {{output}}" | 96 description = "CC {{output}}" |
| 97 outputs = [ | 97 outputs = [ |
| 98 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", | 98 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 99 ] | 99 ] |
| 100 } | 100 } |
| 101 | 101 |
| 102 tool("cxx") { | 102 tool("cxx") { |
| 103 depfile = "{{output}}.d" | 103 depfile = "{{output}}.d" |
| 104 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" | 104 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" |
| 105 depsformat = "gcc" | 105 depsformat = "gcc" |
| 106 description = "CXX {{output}}" | 106 description = "CXX {{output}}" |
| 107 outputs = [ | 107 outputs = [ |
| 108 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", | 108 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 109 ] | 109 ] |
| 110 } | 110 } |
| 111 | 111 |
| 112 tool("asm") { | 112 tool("asm") { |
| 113 # For GCC we can just use the C compiler to compile assembly. | 113 # For GCC we can just use the C compiler to compile assembly. |
| 114 depfile = "{{output}}.d" | 114 depfile = "{{output}}.d" |
| 115 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 115 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
| 116 depsformat = "gcc" | 116 depsformat = "gcc" |
| 117 description = "ASM {{output}}" | 117 description = "ASM {{output}}" |
| 118 outputs = [ | 118 outputs = [ |
| 119 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", | 119 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 120 ] | 120 ] |
| 121 } | 121 } |
| 122 | 122 |
| 123 tool("alink") { | 123 tool("alink") { |
| 124 rspfile = "{{output}}.rsp" | 124 rspfile = "{{output}}.rsp" |
| 125 command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" | 125 command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" |
| 126 description = "AR {{output}}" | 126 description = "AR {{output}}" |
| 127 rspfile_content = "{{inputs}}" | 127 rspfile_content = "{{inputs}}" |
| 128 outputs = [ | 128 outputs = [ |
| 129 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", | 129 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 if (defined(invoker.is_clang)) { | 221 if (defined(invoker.is_clang)) { |
| 222 is_clang = invoker.is_clang | 222 is_clang = invoker.is_clang |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 if (defined(invoker.deps)) { | 226 if (defined(invoker.deps)) { |
| 227 deps = invoker.deps | 227 deps = invoker.deps |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 } | 230 } |
| OLD | NEW |