| 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/clang.gni") | 6 import("//build/toolchain/clang.gni") |
| 7 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
| 8 import("//build/toolchain/gcc_toolchain.gni") | 8 import("//build/toolchain/gcc_toolchain.gni") |
| 9 | 9 |
| 10 # The Android GCC toolchains share most of the same parameters, so we have this | 10 # The Android GCC toolchains share most of the same parameters, so we have this |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 cc = goma_prefix + tool_prefix + "gcc" | 44 cc = goma_prefix + tool_prefix + "gcc" |
| 45 cxx = goma_prefix + tool_prefix + "g++" | 45 cxx = goma_prefix + tool_prefix + "g++" |
| 46 ar = tool_prefix + "ar" | 46 ar = tool_prefix + "ar" |
| 47 ld = cxx | 47 ld = cxx |
| 48 | 48 |
| 49 toolchain_os = "android" | 49 toolchain_os = "android" |
| 50 toolchain_cpu_arch = invoker.toolchain_cpu_arch | 50 toolchain_cpu_arch = invoker.toolchain_cpu_arch |
| 51 | 51 |
| 52 # We make the assumption that the gcc_toolchain will produce a soname with |
| 53 # the following definition. |
| 54 soname = "{{target_output_name}}{{output_extension}}" |
| 55 |
| 56 stripped_soname = "lib.stripped/${soname}.tmp" |
| 57 temp_stripped_soname = "${stripped_soname}.tmp" |
| 58 |
| 52 android_strip = "${tool_prefix}strip" | 59 android_strip = "${tool_prefix}strip" |
| 53 mkdir_command = "mkdir -p lib.stripped" | 60 mkdir_command = "mkdir -p lib.stripped" |
| 54 strip_command = "$android_strip --strip-unneeded -o lib.stripped/\$soname.tm
p \$lib" | 61 strip_command = "$android_strip --strip-unneeded -o $temp_stripped_soname $s
oname" |
| 55 replace_command = "if ! cmp -s lib.stripped/\${soname}.tmp lib.stripped/\${s
oname}; then mv lib.stripped/\${soname}.tmp lib.stripped/\${soname}; fi" | 62 replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then
mv $temp_stripped_soname $stripped_soname; fi" |
| 56 postsolink = "$mkdir_command && $strip_command && $replace_command" | 63 postsolink = "$mkdir_command && $strip_command && $replace_command" |
| 57 } | 64 } |
| 58 } | 65 } |
| 59 | 66 |
| 60 android_gcc_toolchain("x86") { | 67 android_gcc_toolchain("x86") { |
| 61 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" | 68 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" |
| 62 android_ndk_lib_dir = "usr/lib" | 69 android_ndk_lib_dir = "usr/lib" |
| 63 | 70 |
| 64 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" | 71 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" |
| 65 toolchain_cpu_arch = "x86" | 72 toolchain_cpu_arch = "x86" |
| 66 } | 73 } |
| 67 | 74 |
| 68 android_gcc_toolchain("arm") { | 75 android_gcc_toolchain("arm") { |
| 69 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" | 76 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" |
| 70 android_ndk_lib_dir = "usr/lib" | 77 android_ndk_lib_dir = "usr/lib" |
| 71 | 78 |
| 72 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" | 79 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" |
| 73 toolchain_cpu_arch = "arm" | 80 toolchain_cpu_arch = "arm" |
| 74 } | 81 } |
| 75 | 82 |
| 76 android_gcc_toolchain("mipsel") { | 83 android_gcc_toolchain("mipsel") { |
| 77 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" | 84 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" |
| 78 android_ndk_lib_dir = "usr/lib" | 85 android_ndk_lib_dir = "usr/lib" |
| 79 | 86 |
| 80 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" | 87 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" |
| 81 toolchain_cpu_arch = "mipsel" | 88 toolchain_cpu_arch = "mipsel" |
| 82 } | 89 } |
| OLD | NEW |