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

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

Issue 2202873002: Rework approach to allowing extra flags for CrOS builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_cros_nacl_bootstrap_args
Patch Set: fix typos, type checking Created 4 years, 4 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 | « build/config/cros/BUILD.gn ('k') | build/toolchain/gcc_toolchain.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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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/compiler/compiler.gni") 5 import("//build/config/compiler/compiler.gni")
6 import("//build/config/sysroot.gni") 6 import("//build/config/sysroot.gni")
7 import("//build/toolchain/gcc_toolchain.gni") 7 import("//build/toolchain/gcc_toolchain.gni")
8 import("//build/toolchain/cros_toolchain.gni") 8 import("//build/toolchain/cros_toolchain.gni")
9 9
10 # This is the normal toolchain for most targets. 10 # This is the normal toolchain for most targets.
11 gcc_toolchain("target") { 11 gcc_toolchain("target") {
12 ar = cros_target_ar 12 ar = cros_target_ar
13 cc = cros_target_cc 13 cc = cros_target_cc
14 cxx = cros_target_cxx 14 cxx = cros_target_cxx
15 ld = cxx 15 ld = cxx
16 if (cros_target_ld != "") { 16 if (cros_target_ld != "") {
17 ld = cros_target_ld 17 ld = cros_target_ld
18 } 18 }
19 if (cros_target_nm != "") { 19 if (cros_target_nm != "") {
20 nm = cros_target_nm 20 nm = cros_target_nm
21 } 21 }
22 if (cros_target_readelf != "") { 22 if (cros_target_readelf != "") {
23 readelf = cros_target_readelf 23 readelf = cros_target_readelf
24 } 24 }
25 extra_cflags = cros_target_extra_cflags
26 extra_cppflags = cros_target_extra_cppflags
27 extra_cxxflags = cros_target_extra_cxxflags
28 extra_ldflags = cros_target_extra_ldflags
29 25
30 toolchain_args = { 26 toolchain_args = {
31 cc_wrapper = "" 27 cc_wrapper = ""
32 current_cpu = target_cpu 28 current_cpu = target_cpu
33 current_os = "chromeos" 29 current_os = "chromeos"
34 is_clang = is_clang 30 is_clang = is_clang
35 use_debug_fission = use_debug_fission 31 use_debug_fission = use_debug_fission
36 use_gold = use_gold 32 use_gold = use_gold
37 use_sysroot = use_sysroot 33 use_sysroot = use_sysroot
38 } 34 }
(...skipping 10 matching lines...) Expand all
49 ld = cxx 45 ld = cxx
50 if (cros_target_ld != "") { 46 if (cros_target_ld != "") {
51 ld = cros_target_ld 47 ld = cros_target_ld
52 } 48 }
53 if (cros_target_nm != "") { 49 if (cros_target_nm != "") {
54 nm = cros_target_nm 50 nm = cros_target_nm
55 } 51 }
56 if (cros_target_readelf != "") { 52 if (cros_target_readelf != "") {
57 readelf = cros_target_readelf 53 readelf = cros_target_readelf
58 } 54 }
59 extra_cflags = cros_nacl_bootstrap_extra_cflags
60 extra_cppflags = cros_nacl_bootstrap_extra_cppflags
61 extra_cxxflags = cros_nacl_bootstrap_extra_cxxflags
62 extra_ldflags = cros_nacl_bootstrap_extra_ldflags
63 55
64 toolchain_args = { 56 toolchain_args = {
65 cc_wrapper = "" 57 cc_wrapper = ""
66 current_cpu = target_cpu 58 current_cpu = target_cpu
67 current_os = "chromeos" 59 current_os = "chromeos"
68 is_clang = is_clang 60 is_clang = is_clang
69 use_debug_fission = false 61 use_debug_fission = false
70 use_gold = false 62 use_gold = false
71 use_sysroot = false 63 use_sysroot = false
72 } 64 }
73 } 65 }
74 66
75 gcc_toolchain("host") { 67 gcc_toolchain("host") {
76 # These are args for the template. 68 # These are args for the template.
77 ar = cros_host_ar 69 ar = cros_host_ar
78 cc = cros_host_cc 70 cc = cros_host_cc
79 cxx = cros_host_cxx 71 cxx = cros_host_cxx
80 ld = cxx 72 ld = cxx
81 if (cros_host_ld != "") { 73 if (cros_host_ld != "") {
82 ld = cros_host_ld 74 ld = cros_host_ld
83 } 75 }
84 if (cros_host_nm != "") { 76 if (cros_host_nm != "") {
85 nm = cros_host_nm 77 nm = cros_host_nm
86 } 78 }
87 if (cros_host_readelf != "") { 79 if (cros_host_readelf != "") {
88 readelf = cros_host_readelf 80 readelf = cros_host_readelf
89 } 81 }
90 extra_cflags = cros_host_extra_cflags
91 extra_cppflags = cros_host_extra_cppflags
92 extra_cxxflags = cros_host_extra_cxxflags
93 extra_ldflags = cros_host_extra_ldflags
94 82
95 toolchain_args = { 83 toolchain_args = {
96 cc_wrapper = "" 84 cc_wrapper = ""
97 is_clang = cros_host_is_clang 85 is_clang = cros_host_is_clang
98 current_cpu = host_cpu 86 current_cpu = host_cpu
99 current_os = "linux" 87 current_os = "linux"
100 use_sysroot = false 88 use_sysroot = false
101 } 89 }
102 } 90 }
103 91
104 gcc_toolchain("v8_snapshot") { 92 gcc_toolchain("v8_snapshot") {
105 # These are args for the template. 93 # These are args for the template.
106 ar = cros_v8_snapshot_ar 94 ar = cros_v8_snapshot_ar
107 cc = cros_v8_snapshot_cc 95 cc = cros_v8_snapshot_cc
108 cxx = cros_v8_snapshot_cxx 96 cxx = cros_v8_snapshot_cxx
109 ld = cxx 97 ld = cxx
110 if (cros_v8_snapshot_ld != "") { 98 if (cros_v8_snapshot_ld != "") {
111 ld = cros_v8_snapshot_ld 99 ld = cros_v8_snapshot_ld
112 } 100 }
113 if (cros_v8_snapshot_nm != "") { 101 if (cros_v8_snapshot_nm != "") {
114 nm = cros_v8_snapshot_nm 102 nm = cros_v8_snapshot_nm
115 } 103 }
116 if (cros_v8_snapshot_readelf != "") { 104 if (cros_v8_snapshot_readelf != "") {
117 readelf = cros_v8_snapshot_readelf 105 readelf = cros_v8_snapshot_readelf
118 } 106 }
119 extra_cflags = cros_v8_snapshot_extra_cflags
120 extra_cppflags = cros_v8_snapshot_extra_cppflags
121 extra_cxxflags = cros_v8_snapshot_extra_cxxflags
122 extra_ldflags = cros_v8_snapshot_extra_ldflags
123 107
124 toolchain_args = { 108 toolchain_args = {
125 cc_wrapper = "" 109 cc_wrapper = ""
126 is_clang = cros_v8_snapshot_is_clang 110 is_clang = cros_v8_snapshot_is_clang
127 if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") { 111 if (target_cpu == "x86" || target_cpu == "arm" || target_cpu == "mipsel") {
128 current_cpu = "x86" 112 current_cpu = "x86"
129 } else { 113 } else {
130 current_cpu = "x64" 114 current_cpu = "x64"
131 } 115 }
132 v8_current_cpu = v8_target_cpu 116 v8_current_cpu = v8_target_cpu
133 current_os = "linux" 117 current_os = "linux"
134 use_sysroot = false 118 use_sysroot = false
135 } 119 }
136 } 120 }
OLDNEW
« no previous file with comments | « build/config/cros/BUILD.gn ('k') | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698