| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } else { | 44 } else { |
| 45 compiler_prefix = "" | 45 compiler_prefix = "" |
| 46 } | 46 } |
| 47 | 47 |
| 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 | 52 |
| 53 toolchain_os = "android" | 53 toolchain_os = "android" |
| 54 toolchain_cpu_arch = invoker.toolchain_cpu_arch | 54 toolchain_cpu = invoker.toolchain_cpu |
| 55 | 55 |
| 56 # We make the assumption that the gcc_toolchain will produce a soname with | 56 # We make the assumption that the gcc_toolchain will produce a soname with |
| 57 # the following definition. | 57 # the following definition. |
| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 postlink = "$mkdir_command && $strip_command" | 78 postlink = "$mkdir_command && $strip_command" |
| 79 link_outputs = [ stripped_exe ] | 79 link_outputs = [ stripped_exe ] |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 android_gcc_toolchain("x86") { | 83 android_gcc_toolchain("x86") { |
| 84 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" | 84 android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" |
| 85 android_ndk_lib_dir = "usr/lib" | 85 android_ndk_lib_dir = "usr/lib" |
| 86 | 86 |
| 87 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" | 87 tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-" |
| 88 toolchain_cpu_arch = "x86" | 88 toolchain_cpu = "x86" |
| 89 } | 89 } |
| 90 | 90 |
| 91 android_gcc_toolchain("arm") { | 91 android_gcc_toolchain("arm") { |
| 92 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" | 92 android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" |
| 93 android_ndk_lib_dir = "usr/lib" | 93 android_ndk_lib_dir = "usr/lib" |
| 94 | 94 |
| 95 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" | 95 tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-" |
| 96 toolchain_cpu_arch = "arm" | 96 toolchain_cpu = "arm" |
| 97 } | 97 } |
| 98 | 98 |
| 99 android_gcc_toolchain("mipsel") { | 99 android_gcc_toolchain("mipsel") { |
| 100 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" | 100 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" |
| 101 android_ndk_lib_dir = "usr/lib" | 101 android_ndk_lib_dir = "usr/lib" |
| 102 | 102 |
| 103 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" | 103 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" |
| 104 toolchain_cpu_arch = "mipsel" | 104 toolchain_cpu = "mipsel" |
| 105 } | 105 } |
| 106 | 106 |
| 107 android_gcc_toolchain("x64") { | 107 android_gcc_toolchain("x64") { |
| 108 android_ndk_sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" | 108 android_ndk_sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" |
| 109 android_ndk_lib_dir = "usr/lib64" | 109 android_ndk_lib_dir = "usr/lib64" |
| 110 | 110 |
| 111 tool_prefix = "$x86_64_android_toolchain_root/bin/x86_64-linux-android-" | 111 tool_prefix = "$x86_64_android_toolchain_root/bin/x86_64-linux-android-" |
| 112 toolchain_cpu_arch = "x86_64" | 112 toolchain_cpu = "x86_64" |
| 113 } | 113 } |
| 114 | 114 |
| 115 android_gcc_toolchain("arm64") { | 115 android_gcc_toolchain("arm64") { |
| 116 android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" | 116 android_ndk_sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" |
| 117 android_ndk_lib_dir = "usr/lib" | 117 android_ndk_lib_dir = "usr/lib" |
| 118 | 118 |
| 119 tool_prefix = "$arm64_android_toolchain_root/bin/arm-linux-androideabi-" | 119 tool_prefix = "$arm64_android_toolchain_root/bin/arm-linux-androideabi-" |
| 120 toolchain_cpu_arch = "aarch64" | 120 toolchain_cpu = "aarch64" |
| 121 } | 121 } |
| 122 | 122 |
| 123 android_gcc_toolchain("mips64el") { | 123 android_gcc_toolchain("mips64el") { |
| 124 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 124 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
| 125 android_ndk_lib_dir = "usr/lib64" | 125 android_ndk_lib_dir = "usr/lib64" |
| 126 | 126 |
| 127 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 127 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
| 128 toolchain_cpu_arch = "mipsel64el" | 128 toolchain_cpu = "mipsel64el" |
| 129 } | 129 } |
| OLD | NEW |