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

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: remove semicolons from assertions 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
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/toolchain/ccache.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 assert(!use_ccache, "Goma and ccache can't be used together.")
41 compiler_prefix = "$goma_dir/gomacc "
42 } else if (use_ccache) {
43 compiler_prefix = "ccache "
40 } else { 44 } else {
41 goma_prefix = "" 45 compiler_prefix = ""
42 } 46 }
43 47
44 cc = goma_prefix + tool_prefix + "gcc" 48 cc = compiler_prefix + tool_prefix + "gcc"
45 cxx = goma_prefix + tool_prefix + "g++" 49 cxx = compiler_prefix + tool_prefix + "g++"
46 ar = tool_prefix + "ar" 50 ar = tool_prefix + "ar"
47 ld = cxx 51 ld = cxx
48 52
49 toolchain_os = "android" 53 toolchain_os = "android"
50 toolchain_cpu_arch = invoker.toolchain_cpu_arch 54 toolchain_cpu_arch = invoker.toolchain_cpu_arch
51 55
52 # We make the assumption that the gcc_toolchain will produce a soname with 56 # We make the assumption that the gcc_toolchain will produce a soname with
53 # the following definition. 57 # the following definition.
54 soname = "{{target_output_name}}{{output_extension}}" 58 soname = "{{target_output_name}}{{output_extension}}"
55 59
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 toolchain_cpu_arch = "arm" 95 toolchain_cpu_arch = "arm"
92 } 96 }
93 97
94 android_gcc_toolchain("mipsel") { 98 android_gcc_toolchain("mipsel") {
95 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" 99 android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
96 android_ndk_lib_dir = "usr/lib" 100 android_ndk_lib_dir = "usr/lib"
97 101
98 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-" 102 tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-"
99 toolchain_cpu_arch = "mipsel" 103 toolchain_cpu_arch = "mipsel"
100 } 104 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/toolchain/ccache.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698