Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / build / toolchain / android / BUILD.gn
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
3 # found in the LICENSE file.
4
5 import("//build/config/android/config.gni")
6 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/goma.gni")
8 import("//build/toolchain/gcc_toolchain.gni")
9
10 # Get the Android version of the name of the build host's architecture.
11 if (build_cpu_arch == "x64") {
12   android_host_arch = "x86_64"
13 } else if (build_cpu_arch == "x86") {
14   android_host_arch = "x86"
15 } else {
16   assert(false, "Need Android toolchain support for your build OS.")
17 }
18
19 gcc_toolchain("x86") {
20   prefix = "$android_ndk_root/toolchains/x86-4.6/prebuilt/$build_os-$android_host_arch/bin/i686-linux-android-"
21   cc  = prefix + "gcc"
22   cxx = prefix + "g++"
23   ar  = prefix + "ar"
24   ld  = cxx
25
26   toolchain_cpu_arch = "x86"
27   toolchain_os = "android"
28 }
29
30 gcc_toolchain("arm") {
31   prefix = "$android_ndk_root/toolchains/arm-linux-androideabi-4.6/prebuilt/$build_os-$android_host_arch/bin/arm-linux-androideabi-"
32   cc  = prefix + "gcc"
33   cxx = prefix + "g++"
34   ar  = prefix + "ar"
35   ld  = cxx
36
37   toolchain_cpu_arch = "arm"
38   toolchain_os = "android"
39 }
40
41 gcc_toolchain("mipsel") {
42   prefix = "$android_ndk_root/toolchains/mipsel-linux-android-4.6/prebuilt/$build_os-$android_host_arch/bin/mipsel-linux-android-"
43   cc  = prefix + "gcc"
44   cxx = prefix + "g++"
45   ar  = prefix + "ar"
46   ld  = cxx
47
48   toolchain_cpu_arch = "mipsel"
49   toolchain_os = "android"
50 }