| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 # We make the assumption that the gcc_toolchain will produce a soname with | 58 # We make the assumption that the gcc_toolchain will produce a soname with |
| 59 # the following definition. | 59 # the following definition. |
| 60 soname = "{{target_output_name}}{{output_extension}}" | 60 soname = "{{target_output_name}}{{output_extension}}" |
| 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 mkdir_command = "mkdir -p lib.stripped" | |
| 68 strip_command = | 67 strip_command = |
| 69 "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" | 68 "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" |
| 70 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" |
| 71 postsolink = "$mkdir_command && $strip_command && $replace_command" | 70 postsolink = "$strip_command && $replace_command" |
| 72 solink_outputs = [ stripped_soname ] | 71 solink_outputs = [ stripped_soname ] |
| 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 mkdir_command = "mkdir -p exe.stripped" | 77 postlink = "$android_strip --strip-unneeded -o $stripped_exe $exe" |
| 79 strip_command = "$android_strip --strip-unneeded -o $stripped_exe $exe" | |
| 80 postlink = "$mkdir_command && $strip_command" | |
| 81 link_outputs = [ stripped_exe ] | 78 link_outputs = [ stripped_exe ] |
| 82 } | 79 } |
| 83 } | 80 } |
| 84 | 81 |
| 85 android_gcc_toolchain("x86") { | 82 android_gcc_toolchain("x86") { |
| 86 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" | 83 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" |
| 87 android_ndk_lib_dir = "usr/lib" | 84 android_ndk_lib_dir = "usr/lib" |
| 88 | 85 |
| 89 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" | 86 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" |
| 90 toolchain_cpu = "x86" | 87 toolchain_cpu = "x86" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 toolchain_cpu = "aarch64" | 119 toolchain_cpu = "aarch64" |
| 123 } | 120 } |
| 124 | 121 |
| 125 android_gcc_toolchain("mips64el") { | 122 android_gcc_toolchain("mips64el") { |
| 126 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 123 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
| 127 android_ndk_lib_dir = "usr/lib64" | 124 android_ndk_lib_dir = "usr/lib64" |
| 128 | 125 |
| 129 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 126 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
| 130 toolchain_cpu = "mipsel64el" | 127 toolchain_cpu = "mipsel64el" |
| 131 } | 128 } |
| OLD | NEW |