| 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 29 matching lines...) Expand all Loading... |
| 40 assert(!use_ccache, "Goma and ccache can't be used together.") | 40 assert(!use_ccache, "Goma and ccache can't be used together.") |
| 41 compiler_prefix = "$goma_dir/gomacc " | 41 compiler_prefix = "$goma_dir/gomacc " |
| 42 } else if (use_ccache) { | 42 } else if (use_ccache) { |
| 43 compiler_prefix = "ccache " | 43 compiler_prefix = "ccache " |
| 44 } else { | 44 } else { |
| 45 compiler_prefix = "" | 45 compiler_prefix = "" |
| 46 } | 46 } |
| 47 | 47 |
| 48 is_clang = invoker.is_clang | 48 is_clang = invoker.is_clang |
| 49 if (is_clang) { | 49 if (is_clang) { |
| 50 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 50 host_suffix = "" |
| 51 if (host_os == "linux") { |
| 52 host_suffix = "x86_64-linux" |
| 53 } else if (host_os == "mac") { |
| 54 host_suffix = "x86_64-darwin" |
| 55 } else { |
| 56 assert(false, "Unknown host") |
| 57 } |
| 58 |
| 59 prefix = rebase_path("//buildtools/toolchain/clang+llvm-$host_suffix/bin", |
| 51 root_build_dir) | 60 root_build_dir) |
| 52 | 61 |
| 53 cc = compiler_prefix + prefix + "/clang" | 62 cc = compiler_prefix + prefix + "/clang" |
| 54 cxx = compiler_prefix + prefix + "/clang++" | 63 cxx = compiler_prefix + prefix + "/clang++" |
| 64 ar = prefix + "/llvm-ar" |
| 55 } else { | 65 } else { |
| 56 cc = compiler_prefix + tool_prefix + "gcc" | 66 cc = compiler_prefix + tool_prefix + "gcc" |
| 57 cxx = compiler_prefix + tool_prefix + "g++" | 67 cxx = compiler_prefix + tool_prefix + "g++" |
| 68 ar = tool_prefix + "ar" |
| 58 } | 69 } |
| 59 | 70 |
| 60 ar = tool_prefix + "ar" | |
| 61 ld = cxx | 71 ld = cxx |
| 62 readelf = compiler_prefix + tool_prefix + "readelf" | 72 readelf = compiler_prefix + tool_prefix + "readelf" |
| 63 nm = compiler_prefix + tool_prefix + "nm" | 73 nm = compiler_prefix + tool_prefix + "nm" |
| 64 | 74 |
| 65 toolchain_os = "android" | 75 toolchain_os = "android" |
| 66 toolchain_cpu = invoker.toolchain_cpu | 76 toolchain_cpu = invoker.toolchain_cpu |
| 67 | 77 |
| 68 # We make the assumption that the gcc_toolchain will produce a soname with | 78 # We make the assumption that the gcc_toolchain will produce a soname with |
| 69 # the following definition. | 79 # the following definition. |
| 70 soname = "{{target_output_name}}{{output_extension}}" | 80 soname = "{{target_output_name}}{{output_extension}}" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 toolchain_cpu = "aarch64" | 156 toolchain_cpu = "aarch64" |
| 147 } | 157 } |
| 148 | 158 |
| 149 android_gcc_toolchains_helper("mips64el") { | 159 android_gcc_toolchains_helper("mips64el") { |
| 150 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 160 android_ndk_sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
| 151 android_ndk_lib_dir = "usr/lib64" | 161 android_ndk_lib_dir = "usr/lib64" |
| 152 | 162 |
| 153 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" | 163 tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-" |
| 154 toolchain_cpu = "mipsel64el" | 164 toolchain_cpu = "mipsel64el" |
| 155 } | 165 } |
| OLD | NEW |