Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: build/toolchain/android/BUILD.gn

Issue 742953007: add ccache support to gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ccache usage tips Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/clang.gni") 7 import("//build/toolchain/clang.gni")
7 import("//build/toolchain/goma.gni") 8 import("//build/toolchain/goma.gni")
8 import("//build/toolchain/gcc_toolchain.gni") 9 import("//build/toolchain/gcc_toolchain.gni")
9 10
10 # The Android GCC toolchains share most of the same parameters, so we have this 11 # The Android GCC toolchains share most of the same parameters, so we have this
11 # wrapper around gcc_toolchain to avoid duplication of logic. 12 # wrapper around gcc_toolchain to avoid duplication of logic.
12 # 13 #
13 # Parameters: 14 # Parameters:
14 # - android_ndk_sysroot 15 # - android_ndk_sysroot
15 # Sysroot for this architecture. 16 # Sysroot for this architecture.
(...skipping 13 matching lines...) Expand all
29 libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o" 30 libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o"
30 libs_section_postfix = "$android_ndk_lib/crtend_android.o" 31 libs_section_postfix = "$android_ndk_lib/crtend_android.o"
31 32
32 solink_libs_section_prefix = "$android_ndk_lib/crtbegin_so.o" 33 solink_libs_section_prefix = "$android_ndk_lib/crtbegin_so.o"
33 solink_libs_section_postfix = "$android_ndk_lib/crtend_so.o" 34 solink_libs_section_postfix = "$android_ndk_lib/crtend_so.o"
34 35
35 # The tools should be run relative to the build dir. 36 # The tools should be run relative to the build dir.
36 tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir) 37 tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir)
37 38
38 if (use_goma) { 39 if (use_goma) {
39 goma_prefix = "$goma_dir/gomacc " 40 compiler_prefix = "$goma_dir/gomacc "
brettw 2014/11/26 21:18:14 Maybe here we should assert(!use_ccache, "Goma and
Mostyn Bramley-Moore 2014/11/26 22:09:52 Done (and in the linux version also).
41 } else if (use_ccache) {
42 compiler_prefix = "ccache "
40 } else { 43 } else {
41 goma_prefix = "" 44 compiler_prefix = ""
42 } 45 }
43 46
44 cc = goma_prefix + tool_prefix + "gcc" 47 cc = compiler_prefix + tool_prefix + "gcc"
45 cxx = goma_prefix + tool_prefix + "g++" 48 cxx = compiler_prefix + tool_prefix + "g++"
46 ar = tool_prefix + "ar" 49 ar = tool_prefix + "ar"
47 ld = cxx 50 ld = cxx
48 51
49 toolchain_os = "android" 52 toolchain_os = "android"
50 toolchain_cpu_arch = invoker.toolchain_cpu_arch 53 toolchain_cpu_arch = invoker.toolchain_cpu_arch
51 54
52 # We make the assumption that the gcc_toolchain will produce a soname with 55 # We make the assumption that the gcc_toolchain will produce a soname with
53 # the following definition. 56 # the following definition.
54 soname = "{{target_output_name}}{{output_extension}}" 57 soname = "{{target_output_name}}{{output_extension}}"
55 58
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 toolchain_cpu_arch = "arm" 94 toolchain_cpu_arch = "arm"
92 } 95 }
93 96
94 android_gcc_toolchain("mipsel") { 97 android_gcc_toolchain("mipsel") {
95 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" 98 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
96 android_ndk_lib_dir = "usr/lib" 99 android_ndk_lib_dir = "usr/lib"
97 100
98 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" 101 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-"
99 toolchain_cpu_arch = "mipsel" 102 toolchain_cpu_arch = "mipsel"
100 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698