OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 import("//build/config/sysroot.gni") # Imports android/config.gni. | 5 import("//build/config/sysroot.gni") # Imports android/config.gni. |
6 import("//build/toolchain/ccache.gni") | 6 import("//build/toolchain/ccache.gni") |
7 import("//build/toolchain/clang.gni") | 7 import("//build/toolchain/clang.gni") |
8 import("//build/toolchain/goma.gni") | 8 import("//build/toolchain/goma.gni") |
9 import("//build/toolchain/gcc_toolchain.gni") | 9 import("//build/toolchain/gcc_toolchain.gni") |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 soname = "{{target_output_name}}{{output_extension}}" | 58 soname = "{{target_output_name}}{{output_extension}}" |
59 | 59 |
60 stripped_soname = "lib.stripped/${soname}" | 60 stripped_soname = "lib.stripped/${soname}" |
61 temp_stripped_soname = "${stripped_soname}.tmp" | 61 temp_stripped_soname = "${stripped_soname}.tmp" |
62 | 62 |
63 android_strip = "${tool_prefix}strip" | 63 android_strip = "${tool_prefix}strip" |
64 | 64 |
65 mkdir_command = "mkdir -p lib.stripped" | 65 mkdir_command = "mkdir -p lib.stripped" |
66 strip_command = | 66 strip_command = |
67 "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" | 67 "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" |
68 replace_command = | 68 replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then
mv $temp_stripped_soname $stripped_soname; fi" |
69 "if ! cmp -s $temp_stripped_soname $stripped_soname; then mv $temp_strip
ped_soname $stripped_soname; fi" | |
70 postsolink = "$mkdir_command && $strip_command && $replace_command" | 69 postsolink = "$mkdir_command && $strip_command && $replace_command" |
71 solink_outputs = [ stripped_soname ] | 70 solink_outputs = [ stripped_soname ] |
72 | 71 |
73 # We make the assumption that the gcc_toolchain will produce an exe with | 72 # We make the assumption that the gcc_toolchain will produce an exe with |
74 # the following definition. | 73 # the following definition. |
75 exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" | 74 exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
76 stripped_exe = "exe.stripped/$exe" | 75 stripped_exe = "exe.stripped/$exe" |
77 mkdir_command = "mkdir -p exe.stripped" | 76 mkdir_command = "mkdir -p exe.stripped" |
78 strip_command = "$android_strip --strip-unneeded -o $stripped_exe $exe" | 77 strip_command = "$android_strip --strip-unneeded -o $stripped_exe $exe" |
79 postlink = "$mkdir_command && $strip_command" | 78 postlink = "$mkdir_command && $strip_command" |
(...skipping 17 matching lines...) Expand all Loading... |
97 toolchain_cpu_arch = "arm" | 96 toolchain_cpu_arch = "arm" |
98 } | 97 } |
99 | 98 |
100 android_gcc_toolchain("mipsel") { | 99 android_gcc_toolchain("mipsel") { |
101 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" | 100 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" |
102 android_ndk_lib_dir = "usr/lib" | 101 android_ndk_lib_dir = "usr/lib" |
103 | 102 |
104 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" | 103 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" |
105 toolchain_cpu_arch = "mipsel" | 104 toolchain_cpu_arch = "mipsel" |
106 } | 105 } |
OLD | NEW |