| 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("../clang.gni") | 5 import("../clang.gni") |
| 6 import("../goma.gni") | 6 import("../goma.gni") |
| 7 import("../gcc_toolchain.gni") | 7 import("../gcc_toolchain.gni") |
| 8 | 8 |
| 9 # Get the location of the Android tools in our tree. | 9 # Get the location of the Android tools in our tree. |
| 10 android_ndk_root = | 10 android_ndk_root = |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 android_toolchain_arch = "arm-linux-androideabi-4.6" | 37 android_toolchain_arch = "arm-linux-androideabi-4.6" |
| 38 } else { | 38 } else { |
| 39 assert(false, "Need Android toolchain support for your platform.") | 39 assert(false, "Need Android toolchain support for your platform.") |
| 40 } | 40 } |
| 41 | 41 |
| 42 android_toolchain = | 42 android_toolchain = |
| 43 "$android_ndk_root/toolchains/$android_toolchain_arch/prebuilt/$build_os-$
android_host_arch/bin" | 43 "$android_ndk_root/toolchains/$android_toolchain_arch/prebuilt/$build_os-$
android_host_arch/bin" |
| 44 | 44 |
| 45 # This script will find the compilers for the given Android toolchain | 45 # This script will find the compilers for the given Android toolchain |
| 46 # directory. | 46 # directory. |
| 47 # TODO(brettw) write this script which locates the Android compilers. | 47 android_compilers = exec_script("find_android_compiler.py", |
| 48 #android_compilers = exec_script("find_android_compilers.py", | 48 [android_toolchain], "value") |
| 49 # [android_toolchain], "value") | |
| 50 android_compilers = ["gcc", "g++", "gcc", "g++"] | |
| 51 gyp_header = | 49 gyp_header = |
| 52 "'make_global_settings': [" + | 50 "'make_global_settings': [" + |
| 53 "['CC', '" + android_compilers[0] + "']," + | 51 "['CC', '" + android_compilers[0] + "']," + |
| 54 "['CXX', '" + android_compilers[1] + "']," + | 52 "['CXX', '" + android_compilers[1] + "']," + |
| 55 "['CC.host', '" + android_compilers[2] + "']," + | 53 "['CC.host', '" + android_compilers[2] + "']," + |
| 56 "['CXX.host', '" + android_compilers[3] + "']," + | 54 "['CXX.host', '" + android_compilers[3] + "']," + |
| 57 "]," | 55 "]," |
| 58 } | 56 } |
| 59 | 57 |
| 60 if (use_goma) { | 58 if (use_goma) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 gcc_toolchain("arm") { | 90 gcc_toolchain("arm") { |
| 93 prefix = "$android_ndk_root/toolchains/arm-linux-androideabi-4.6/prebuilt/$bui
ld_os-$android_host_arch/bin/arm-linux-androideabi-" | 91 prefix = "$android_ndk_root/toolchains/arm-linux-androideabi-4.6/prebuilt/$bui
ld_os-$android_host_arch/bin/arm-linux-androideabi-" |
| 94 cc = prefix + "gcc" | 92 cc = prefix + "gcc" |
| 95 cxx = prefix + "g++" | 93 cxx = prefix + "g++" |
| 96 ar = prefix + "ar" | 94 ar = prefix + "ar" |
| 97 ld = cxx | 95 ld = cxx |
| 98 | 96 |
| 99 toolchain_cpu_arch = "arm" | 97 toolchain_cpu_arch = "arm" |
| 100 toolchain_os = "android" | 98 toolchain_os = "android" |
| 101 } | 99 } |
| OLD | NEW |