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

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

Issue 2797303005: [infra] Fixes for cross-toolchains (Closed)
Patch Set: Roll boringssl_gen and remove bad assert Created 3 years, 8 months 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 | « DEPS ('k') | third_party/tcmalloc/BUILD.gn » ('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") 5 import("//build/config/sysroot.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/gcc_toolchain.gni") 8 import("//build/toolchain/gcc_toolchain.gni")
9 import("//build/toolchain/goma.gni") 9 import("//build/toolchain/goma.gni")
10 10
11 declare_args() { 11 declare_args() {
12 toolchain_prefix = "" 12 toolchain_prefix = ""
13 } 13 }
14 14
15 if (use_goma) { 15 if (use_goma) {
16 assert(!use_ccache, "Goma and ccache can't be used together.") 16 assert(!use_ccache, "Goma and ccache can't be used together.")
17 compiler_prefix = "$goma_dir/gomacc " 17 compiler_prefix = "$goma_dir/gomacc "
18 } else if (use_ccache) { 18 } else if (use_ccache) {
19 compiler_prefix = "ccache " 19 compiler_prefix = "ccache "
20 } else { 20 } else {
21 compiler_prefix = "" 21 compiler_prefix = ""
22 } 22 }
23 23
24 gcc_toolchain("arm") { 24 gcc_toolchain("arm") {
25 cc = "${compiler_prefix}arm-linux-gnueabihf-gcc" 25 prefix = "arm-linux-gnueabihf-"
26 cxx = "${compiler_prefix}arm-linux-gnueabihf-g++" 26 if (toolchain_prefix != "") {
27 prefix = toolchain_prefix
28 }
27 29
28 ar = "arm-linux-gnueabihf-ar" 30 cc = "${compiler_prefix}${prefix}gcc"
31 cxx = "${compiler_prefix}${prefix}g++"
32
33 ar = "${prefix}ar"
29 ld = cxx 34 ld = cxx
30 readelf = "arm-linux-gnueabihf-readelf" 35 readelf = "${prefix}readelf"
31 nm = "arm-linux-gnueabihf-nm" 36 nm = "${prefix}nm"
32 37
33 toolchain_cpu = "arm" 38 toolchain_cpu = "arm"
34 toolchain_os = "linux" 39 toolchain_os = "linux"
35 is_clang = false 40 is_clang = false
36 } 41 }
37 42
38 gcc_toolchain("arm64") { 43 gcc_toolchain("arm64") {
39 cc = "${compiler_prefix}aarch64-linux-gnu-gcc" 44 prefix = "aarch64-linux-gnu-"
40 cxx = "${compiler_prefix}aarch64-linux-gnu-g++" 45 if (toolchain_prefix != "") {
46 prefix = toolchain_prefix
47 }
41 48
42 ar = "aarch64-linux-gnu-ar" 49 cc = "${compiler_prefix}${prefix}gcc"
50 cxx = "${compiler_prefix}${prefix}g++"
51
52 ar = "${prefix}ar"
43 ld = cxx 53 ld = cxx
44 readelf = "aarch64-linux-gnu-readelf" 54 readelf = "${prefix}readelf"
45 nm = "aarch64-linux-gnu-nm" 55 nm = "${prefix}nm"
46 56
47 toolchain_cpu = "arm64" 57 toolchain_cpu = "arm64"
48 toolchain_os = "linux" 58 toolchain_os = "linux"
49 is_clang = false 59 is_clang = false
50 } 60 }
51 61
52 gcc_toolchain("clang_x86") { 62 gcc_toolchain("clang_x86") {
53 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 63 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
54 root_build_dir) 64 root_build_dir)
55 cc = "${compiler_prefix}$prefix/clang" 65 cc = "${compiler_prefix}$prefix/clang"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 nm = "nm" 112 nm = "nm"
103 ar = "ar" 113 ar = "ar"
104 ld = cxx 114 ld = cxx
105 115
106 toolchain_cpu = "x64" 116 toolchain_cpu = "x64"
107 toolchain_os = "linux" 117 toolchain_os = "linux"
108 is_clang = false 118 is_clang = false
109 } 119 }
110 120
111 gcc_toolchain("mipsel") { 121 gcc_toolchain("mipsel") {
112 cc = "${toolchain_prefix}gcc" 122 cc = "${compiler_prefix}${toolchain_prefix}gcc"
113 cxx = "${toolchain_prefix}g++" 123 cxx = "${compiler_prefix}${toolchain_prefix}g++"
114 ar = "${toolchain_prefix}ar" 124 ar = "${toolchain_prefix}ar"
115 ld = cxx 125 ld = cxx
116 readelf = "${toolchain_prefix}readelf" 126 readelf = "${toolchain_prefix}readelf"
117 nm = "${toolchain_prefix}nm" 127 nm = "${toolchain_prefix}nm"
118 128
119 toolchain_cpu = "${target_cpu}" 129 toolchain_cpu = "${target_cpu}"
120 toolchain_os = "linux" 130 toolchain_os = "linux"
121 is_clang = is_clang 131 is_clang = is_clang
122 } 132 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/tcmalloc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698