| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 cc = compiler_prefix + tool_prefix + "gcc" | 48 cc = compiler_prefix + tool_prefix + "gcc" |
| 49 cxx = compiler_prefix + tool_prefix + "g++" | 49 cxx = compiler_prefix + tool_prefix + "g++" |
| 50 ar = tool_prefix + "ar" | 50 ar = tool_prefix + "ar" |
| 51 ld = cxx | 51 ld = cxx |
| 52 readelf = compiler_prefix + tool_prefix + "readelf" | 52 readelf = compiler_prefix + tool_prefix + "readelf" |
| 53 nm = compiler_prefix + tool_prefix + "nm" | 53 nm = compiler_prefix + tool_prefix + "nm" |
| 54 | 54 |
| 55 toolchain_os = "android" | 55 toolchain_os = "android" |
| 56 toolchain_cpu = invoker.toolchain_cpu | 56 toolchain_cpu = invoker.toolchain_cpu |
| 57 | 57 |
| 58 # We make the assumption that the gcc_toolchain will produce a soname with | 58 # Use the same soname and sofile as gcc_toolchain |
| 59 # the following definition. | |
| 60 soname = "{{target_output_name}}{{output_extension}}" | 59 soname = "{{target_output_name}}{{output_extension}}" |
| 60 sofile = "{{root_out_dir}}/lib/$soname" |
| 61 | 61 |
| 62 stripped_soname = "lib.stripped/${soname}" | 62 stripped_soname = "lib.stripped/${soname}" |
| 63 temp_stripped_soname = "${stripped_soname}.tmp" | 63 temp_stripped_soname = "${stripped_soname}.tmp" |
| 64 | 64 |
| 65 android_strip = "${tool_prefix}strip" | 65 android_strip = "${tool_prefix}strip" |
| 66 | 66 |
| 67 strip_command = | 67 strip_command = |
| 68 "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" | 68 "$android_strip --strip-unneeded -o $temp_stripped_soname $sofile" |
| 69 replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then
mv $temp_stripped_soname $stripped_soname; fi" | 69 replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then
mv $temp_stripped_soname $stripped_soname; fi" |
| 70 postsolink = "$strip_command && $replace_command" | 70 postsolink = "$strip_command && $replace_command" |
| 71 solink_outputs = [ stripped_soname ] | 71 solink_outputs = [ stripped_soname ] |
| 72 default_output_extension = android_product_extension | |
| 73 | 72 |
| 74 # We make the assumption that the gcc_toolchain will produce an exe with | 73 # We make the assumption that the gcc_toolchain will produce an exe with |
| 75 # the following definition. | 74 # the following definition. |
| 76 exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" | 75 exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
| 77 stripped_exe = "exe.stripped/$exe" | 76 stripped_exe = "exe.stripped/$exe" |
| 78 postlink = "$android_strip --strip-unneeded -o $stripped_exe $exe" | 77 postlink = "$android_strip --strip-unneeded -o $stripped_exe $exe" |
| 79 link_outputs = [ stripped_exe ] | 78 link_outputs = [ stripped_exe ] |
| 80 } | 79 } |
| 81 } | 80 } |
| 82 | 81 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 toolchain_cpu = "aarch64" | 119 toolchain_cpu = "aarch64" |
| 121 } | 120 } |
| 122 | 121 |
| 123 android_gcc_toolchain("mips64el") { | 122 android_gcc_toolchain("mips64el") { |
| 124 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 123 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
| 125 android_ndk_lib_dir = "usr/lib64" | 124 android_ndk_lib_dir = "usr/lib64" |
| 126 | 125 |
| 127 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 126 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
| 128 toolchain_cpu = "mipsel64el" | 127 toolchain_cpu = "mipsel64el" |
| 129 } | 128 } |
| OLD | NEW |