| 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 toolchain("x86_newlib") { | 5 toolchain("x86_newlib") { |
| 6 toolprefix = "gen/sdk/toolchain/linux_x86_newlib/bin/x86_64-nacl-" | 6 toolprefix = "gen/sdk/toolchain/linux_x86_newlib/bin/x86_64-nacl-" |
| 7 cc = toolprefix + "gcc" | 7 cc = toolprefix + "gcc" |
| 8 cxx = toolprefix + "g++" | 8 cxx = toolprefix + "g++" |
| 9 ld = toolprefix + "g++" | 9 ld = toolprefix + "g++" |
| 10 | 10 |
| 11 tool("cc") { | 11 tool("cc") { |
| 12 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c
\$in -o \$out" | 12 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c
\$in -o \$out" |
| 13 description = "CC(NaCl x86 Newlib) \$out" | 13 description = "CC(NaCl x86 Newlib) \$out" |
| 14 depfile = "\$out.d" | 14 depfile = "\$out.d" |
| 15 deps = "gcc" | 15 depsformat = "gcc" |
| 16 } | 16 } |
| 17 tool("cxx") { | 17 tool("cxx") { |
| 18 # cflags_pch_cc | 18 # cflags_pch_cc |
| 19 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -
c \$in -o \$out" | 19 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -
c \$in -o \$out" |
| 20 description = "CXX(NaCl x86 Newlib) \$out" | 20 description = "CXX(NaCl x86 Newlib) \$out" |
| 21 depfile = "\$out.d" | 21 depfile = "\$out.d" |
| 22 deps = "gcc" | 22 depsformat = "gcc" |
| 23 } | 23 } |
| 24 tool("alink") { | 24 tool("alink") { |
| 25 command = "rm -f \$out && ${toolprefix}ar rcs \$out \$in" | 25 command = "rm -f \$out && ${toolprefix}ar rcs \$out \$in" |
| 26 description = "AR(NaCl x86 Newlib) \$out" | 26 description = "AR(NaCl x86 Newlib) \$out" |
| 27 } | 27 } |
| 28 tool("solink") { | 28 tool("solink") { |
| 29 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags
-o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-
archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut
-f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\
$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { rea
delf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${li
b}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ;
fi; fi" | 29 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags
-o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-
archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut
-f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\
$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { rea
delf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${li
b}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ;
fi; fi" |
| 30 description = "SOLINK(NaCl x86 Newlib) \$lib" | 30 description = "SOLINK(NaCl x86 Newlib) \$lib" |
| 31 #pool = "link_pool" | 31 #pool = "link_pool" |
| 32 restat = "1" | 32 restat = "1" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 toolchain_args() { | 52 toolchain_args() { |
| 53 # Override the default OS detection. The build config will set the is_* | 53 # Override the default OS detection. The build config will set the is_* |
| 54 # flags accordingly. | 54 # flags accordingly. |
| 55 os = "nacl" | 55 os = "nacl" |
| 56 | 56 |
| 57 # Component build not supported in NaCl, since it does not support shared | 57 # Component build not supported in NaCl, since it does not support shared |
| 58 # libraries. | 58 # libraries. |
| 59 is_component_build = false | 59 is_component_build = false |
| 60 } | 60 } |
| 61 } | 61 } |
| OLD | NEW |