| 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 template defines a GCC toolchain. | 5 # This template defines a GCC toolchain. |
| 6 # | 6 # |
| 7 # It requires the following variables specifying the executables to run: | 7 # It requires the following variables specifying the executables to run: |
| 8 # - cc | 8 # - cc |
| 9 # - cxx | 9 # - cxx |
| 10 # - ar | 10 # - ar |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 # Make these apply to all tools below. | 58 # Make these apply to all tools below. |
| 59 lib_prefix = "-l" | 59 lib_prefix = "-l" |
| 60 lib_dir_prefix="-L" | 60 lib_dir_prefix="-L" |
| 61 | 61 |
| 62 tool("cc") { | 62 tool("cc") { |
| 63 # cflags_pch_c | 63 # cflags_pch_c |
| 64 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -
c \$in -o \$out" | 64 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -
c \$in -o \$out" |
| 65 description = "CC \$out" | 65 description = "CC \$out" |
| 66 depfile = "\$out.d" | 66 depfile = "\$out.d" |
| 67 deps = "gcc" | 67 depsformat = "gcc" |
| 68 } | 68 } |
| 69 tool("cxx") { | 69 tool("cxx") { |
| 70 # cflags_pch_cc | 70 # cflags_pch_cc |
| 71 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc
-c \$in -o \$out" | 71 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc
-c \$in -o \$out" |
| 72 description = "CXX \$out" | 72 description = "CXX \$out" |
| 73 depfile = "\$out.d" | 73 depfile = "\$out.d" |
| 74 deps = "gcc" | 74 depsformat = "gcc" |
| 75 } | 75 } |
| 76 tool("alink") { | 76 tool("alink") { |
| 77 command = "rm -f \$out && $ar rcs \$out @\$rspfile" | 77 command = "rm -f \$out && $ar rcs \$out @\$rspfile" |
| 78 description = "AR \$out" | 78 description = "AR \$out" |
| 79 rspfile = "\$out.rsp" | 79 rspfile = "\$out.rsp" |
| 80 rspfile_content = "\$in" | 80 rspfile_content = "\$in" |
| 81 } | 81 } |
| 82 tool("solink") { | 82 tool("solink") { |
| 83 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldfla
gs -o \$lib -Wl,-soname=\$soname @\$rspfile && { readelf -d \${lib} | grep SONAM
E ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$l
dflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-
whole-archive $libs_section_prefix \$libs $libs_section_postfix && { readelf -d
\${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp &
& if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" | 83 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldfla
gs -o \$lib -Wl,-soname=\$soname @\$rspfile && { readelf -d \${lib} | grep SONAM
E ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$l
dflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-
whole-archive $libs_section_prefix \$libs $libs_section_postfix && { readelf -d
\${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp &
& if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" |
| 84 description = "SOLINK \$lib" | 84 description = "SOLINK \$lib" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 108 toolchain_args() { | 108 toolchain_args() { |
| 109 cpu_arch = invoker.toolchain_cpu_arch | 109 cpu_arch = invoker.toolchain_cpu_arch |
| 110 os = invoker.toolchain_os | 110 os = invoker.toolchain_os |
| 111 } | 111 } |
| 112 | 112 |
| 113 if (defined(invoker.deps)) { | 113 if (defined(invoker.deps)) { |
| 114 deps = invoker.deps | 114 deps = invoker.deps |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| OLD | NEW |