| 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/clang/clang.gni") |
| 5 import("//build/config/sysroot.gni") # Imports android/config.gni. | 6 import("//build/config/sysroot.gni") # Imports android/config.gni. |
| 6 import("//build/toolchain/gcc_toolchain.gni") | 7 import("//build/toolchain/gcc_toolchain.gni") |
| 7 | 8 |
| 8 # The Android GCC toolchains share most of the same parameters, so we have this | 9 # The Android GCC toolchains share most of the same parameters, so we have this |
| 9 # wrapper around gcc_toolchain to avoid duplication of logic. | 10 # wrapper around gcc_toolchain to avoid duplication of logic. |
| 10 # | 11 # |
| 11 # Parameters: | 12 # Parameters: |
| 12 # - toolchain_cpu | 13 # - toolchain_cpu |
| 13 # Same as gcc_toolchain. | 14 # Same as gcc_toolchain. |
| 14 # - toolchain_root | 15 # - toolchain_root |
| (...skipping 20 matching lines...) Expand all Loading... |
| 35 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" | 36 solink_libs_section_prefix = "$_ndk_lib/crtbegin_so.o" |
| 36 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" | 37 solink_libs_section_postfix = "$_ndk_lib/crtend_so.o" |
| 37 | 38 |
| 38 _android_tool_prefix = | 39 _android_tool_prefix = |
| 39 "${invoker.toolchain_root}/bin/${invoker.binary_prefix}-" | 40 "${invoker.toolchain_root}/bin/${invoker.binary_prefix}-" |
| 40 | 41 |
| 41 # The tools should be run relative to the build dir. | 42 # The tools should be run relative to the build dir. |
| 42 _tool_prefix = rebase_path("$_android_tool_prefix", root_build_dir) | 43 _tool_prefix = rebase_path("$_android_tool_prefix", root_build_dir) |
| 43 | 44 |
| 44 if (is_clang) { | 45 if (is_clang) { |
| 45 _prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 46 _prefix = rebase_path("$clang_base_path/bin", root_build_dir) |
| 46 root_build_dir) | |
| 47 cc = "$_prefix/clang" | 47 cc = "$_prefix/clang" |
| 48 cxx = "$_prefix/clang++" | 48 cxx = "$_prefix/clang++" |
| 49 } else { | 49 } else { |
| 50 cc = "${_tool_prefix}gcc" | 50 cc = "${_tool_prefix}gcc" |
| 51 cxx = "${_tool_prefix}g++" | 51 cxx = "${_tool_prefix}g++" |
| 52 } | 52 } |
| 53 ar = _tool_prefix + "ar" | 53 ar = _tool_prefix + "ar" |
| 54 ld = cxx | 54 ld = cxx |
| 55 readelf = _tool_prefix + "readelf" | 55 readelf = _tool_prefix + "readelf" |
| 56 nm = _tool_prefix + "nm" | 56 nm = _tool_prefix + "nm" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 binary_prefix = "aarch64-linux-android" | 113 binary_prefix = "aarch64-linux-android" |
| 114 } | 114 } |
| 115 | 115 |
| 116 android_gcc_toolchains_helper("mips64el") { | 116 android_gcc_toolchains_helper("mips64el") { |
| 117 toolchain_cpu = "mips64el" | 117 toolchain_cpu = "mips64el" |
| 118 toolchain_root = mips64_android_toolchain_root | 118 toolchain_root = mips64_android_toolchain_root |
| 119 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 119 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
| 120 lib_dir = "usr/lib64" | 120 lib_dir = "usr/lib64" |
| 121 binary_prefix = "mips64el-linux-android" | 121 binary_prefix = "mips64el-linux-android" |
| 122 } | 122 } |
| OLD | NEW |