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

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 1283313004: Rename is_chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trim Created 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 # ============================================================================= 5 # =============================================================================
6 # PLATFORM SELECTION 6 # PLATFORM SELECTION
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name
10 # of the GN thing that encodes combinations of these things. 10 # of the GN thing that encodes combinations of these things.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 # 0 means no symbols. 118 # 0 means no symbols.
119 # -1 means auto-set (off in release, regular in debug). 119 # -1 means auto-set (off in release, regular in debug).
120 symbol_level = -1 120 symbol_level = -1
121 121
122 # Component build. 122 # Component build.
123 is_component_build = false 123 is_component_build = false
124 124
125 # Debug build. 125 # Debug build.
126 is_debug = true 126 is_debug = true
127 127
128 # Whether we're using a chromeos user interface.
129 is_chromeos_ui = current_os == "chromeos"
130
128 # Whether we're a traditional desktop unix. 131 # Whether we're a traditional desktop unix.
129 is_desktop_linux = current_os == "linux" && current_os != "chromeos" 132 is_desktop_linux = current_os == "linux"
130 133
131 # Set to true when compiling with the Clang compiler. Typically this is used 134 # Set to true when compiling with the Clang compiler. Typically this is used
132 # to configure warnings. 135 # to configure warnings.
133 is_clang = current_os == "mac" || current_os == "ios" || 136 is_clang = current_os == "mac" || current_os == "ios" ||
134 current_os == "linux" || current_os == "chromeos" 137 current_os == "linux" || current_os == "chromeos"
135 138
136 # Compile for Address Sanitizer to find memory bugs. 139 # Compile for Address Sanitizer to find memory bugs.
137 is_asan = false 140 is_asan = false
138 141
139 # Compile for Leak Sanitizer to find leaks. 142 # Compile for Leak Sanitizer to find leaks.
140 is_lsan = false 143 is_lsan = false
141 144
142 # Compile for Memory Sanitizer to find uninitialized reads. 145 # Compile for Memory Sanitizer to find uninitialized reads.
143 is_msan = false 146 is_msan = false
144 147
145 # Compile for Thread Sanitizer to find threading bugs. 148 # Compile for Thread Sanitizer to find threading bugs.
146 is_tsan = false 149 is_tsan = false
147 150
148 if (current_os == "chromeos") { 151 # Allows the target toolchain to be injected as arguments. This is needed
149 # Allows the target toolchain to be injected as arguments. This is needed 152 # to support the CrOS build system which supports per-build-configuration
150 # to support the CrOS build system which supports per-build-configuration 153 # toolchains.
151 # toolchains. 154 cros_use_custom_toolchain = false
Peter Mayo 2015/08/13 01:46:46 This change can be separated.
Peter Mayo 2015/08/13 02:07:38 Done. https://codereview.chromium.org/1287153002/
152 cros_use_custom_toolchain = false
153 }
154 155
155 # DON'T ADD MORE FLAGS HERE. Read the comment above. 156 # DON'T ADD MORE FLAGS HERE. Read the comment above.
156 } 157 }
157 158
158 # ============================================================================= 159 # =============================================================================
159 # OS DEFINITIONS 160 # OS DEFINITIONS
160 # ============================================================================= 161 # =============================================================================
161 # 162 #
162 # We set these various is_FOO booleans for convenience in writing OS-based 163 # We set these various is_FOO booleans for convenience in writing OS-based
163 # conditions. 164 # conditions.
164 # 165 #
165 # - is_android, is_chromeos, is_ios, and is_win should be obvious. 166 # - is_android, is_chromeos_os, is_ios, and is_win should be obvious.
166 # - is_mac is set only for desktop Mac. It is not set on iOS. 167 # - is_mac is set only for desktop Mac. It is not set on iOS.
167 # - is_posix is true for mac and any Unix-like system (basically everything 168 # - is_posix is true for mac and any Unix-like system (basically everything
168 # except Windows). 169 # except Windows).
169 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is 170 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is
170 # generally too different despite being based on the Linux kernel). 171 # generally too different despite being based on the Linux kernel).
171 # 172 #
172 # Do not add more is_* variants here for random lesser-used Unix systems like 173 # Do not add more is_* variants here for random lesser-used Unix systems like
173 # aix or one of the BSDs. If you need to check these, just check the 174 # aix or one of the BSDs. If you need to check these, just check the
174 # current_os value directly. 175 # current_os value directly.
175 176
176 if (current_os == "win" || current_os == "winrt_81" || 177 if (current_os == "win" || current_os == "winrt_81" ||
177 current_os == "winrt_81_phone" || current_os == "winrt_10") { 178 current_os == "winrt_81_phone" || current_os == "winrt_10") {
178 is_android = false 179 is_android = false
179 is_chromeos = false 180 is_chromeos_os = false
180 is_ios = false 181 is_ios = false
181 is_linux = false 182 is_linux = false
182 is_mac = false 183 is_mac = false
183 is_nacl = false 184 is_nacl = false
184 is_posix = false 185 is_posix = false
185 is_win = true 186 is_win = true
186 } else if (current_os == "mac") { 187 } else if (current_os == "mac") {
187 is_android = false 188 is_android = false
188 is_chromeos = false 189 is_chromeos_os = false
189 is_ios = false 190 is_ios = false
190 is_linux = false 191 is_linux = false
191 is_mac = true 192 is_mac = true
192 is_nacl = false 193 is_nacl = false
193 is_posix = true 194 is_posix = true
194 is_win = false 195 is_win = false
195 } else if (current_os == "android") { 196 } else if (current_os == "android") {
196 is_android = true 197 is_android = true
197 is_chromeos = false 198 is_chromeos_os = false
198 is_ios = false 199 is_ios = false
199 is_linux = false 200 is_linux = false
200 is_mac = false 201 is_mac = false
201 is_nacl = false 202 is_nacl = false
202 is_posix = true 203 is_posix = true
203 is_win = false 204 is_win = false
204 } else if (current_os == "chromeos") { 205 } else if (current_os == "chromeos") {
205 is_android = false 206 is_android = false
206 is_chromeos = true 207 assert(is_chromeos_ui)
Peter Mayo 2015/08/13 01:46:46 Provide message with assert.
Peter Mayo 2015/08/13 02:07:38 Done.
208 is_chromeos_os = true
207 is_ios = false 209 is_ios = false
208 is_linux = true 210 is_linux = true
209 is_mac = false 211 is_mac = false
210 is_nacl = false 212 is_nacl = false
211 is_posix = true 213 is_posix = true
212 is_win = false 214 is_win = false
213 } else if (current_os == "nacl") { 215 } else if (current_os == "nacl") {
214 # current_os == "nacl" will be passed by the nacl toolchain definition. 216 # current_os == "nacl" will be passed by the nacl toolchain definition.
215 # It is not set by default or on the command line. We treat is as a 217 # It is not set by default or on the command line. We treat is as a
216 # Posix variant. 218 # Posix variant.
217 is_android = false 219 is_android = false
218 is_chromeos = false 220 is_chromeos_os = false
219 is_ios = false 221 is_ios = false
220 is_linux = false 222 is_linux = false
221 is_mac = false 223 is_mac = false
222 is_nacl = true 224 is_nacl = true
223 is_posix = true 225 is_posix = true
224 is_win = false 226 is_win = false
225 } else if (current_os == "ios") { 227 } else if (current_os == "ios") {
226 is_android = false 228 is_android = false
227 is_chromeos = false 229 is_chromeos_os = false
228 is_ios = true 230 is_ios = true
229 is_linux = false 231 is_linux = false
230 is_mac = false 232 is_mac = false
231 is_nacl = false 233 is_nacl = false
232 is_posix = true 234 is_posix = true
233 is_win = false 235 is_win = false
234 } else if (current_os == "linux") { 236 } else if (current_os == "linux") {
235 is_android = false 237 is_android = false
236 is_chromeos = false 238 is_chromeos_os = false
237 is_ios = false 239 is_ios = false
238 is_linux = true 240 is_linux = true
239 is_mac = false 241 is_mac = false
240 is_nacl = false 242 is_nacl = false
241 is_posix = true 243 is_posix = true
242 is_win = false 244 is_win = false
243 } 245 }
244 246
247 # This is for backwards compatability until the rename in complete in all
248 # dependent files.
249 is_chromeos = is_chromeos_ui
250
245 # ============================================================================= 251 # =============================================================================
246 # SOURCES FILTERS 252 # SOURCES FILTERS
247 # ============================================================================= 253 # =============================================================================
248 # 254 #
249 # These patterns filter out platform-specific files when assigning to the 255 # These patterns filter out platform-specific files when assigning to the
250 # sources variable. The magic variable |sources_assignment_filter| is applied 256 # sources variable. The magic variable |sources_assignment_filter| is applied
251 # to each assignment or appending to the sources variable and matches are 257 # to each assignment or appending to the sources variable and matches are
252 # automatcally removed. 258 # automatcally removed.
253 # 259 #
254 # Note that the patterns are NOT regular expressions. Only "*" and "\b" (path 260 # Note that the patterns are NOT regular expressions. Only "*" and "\b" (path
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 327 }
322 if (!is_android) { 328 if (!is_android) {
323 sources_assignment_filter += [ 329 sources_assignment_filter += [
324 "*_android.h", 330 "*_android.h",
325 "*_android.cc", 331 "*_android.cc",
326 "*_android_unittest.h", 332 "*_android_unittest.h",
327 "*_android_unittest.cc", 333 "*_android_unittest.cc",
328 "*\bandroid/*", 334 "*\bandroid/*",
329 ] 335 ]
330 } 336 }
331 if (!is_chromeos) { 337 if (!is_chromeos_ui) {
332 sources_assignment_filter += [ 338 sources_assignment_filter += [
333 "*_chromeos.h", 339 "*_chromeos.h",
334 "*_chromeos.cc", 340 "*_chromeos.cc",
335 "*_chromeos_unittest.h", 341 "*_chromeos_unittest.h",
336 "*_chromeos_unittest.cc", 342 "*_chromeos_unittest.cc",
337 "*\bchromeos/*", 343 "*\bchromeos/*",
338 ] 344 ]
339 } 345 }
340 346
341 # DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call 347 # DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 set_default_toolchain("//build/toolchain/android:$current_cpu") 586 set_default_toolchain("//build/toolchain/android:$current_cpu")
581 } 587 }
582 } else if (is_linux) { 588 } else if (is_linux) {
583 if (is_clang) { 589 if (is_clang) {
584 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" 590 host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
585 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") 591 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu")
586 } else { 592 } else {
587 host_toolchain = "//build/toolchain/linux:$host_cpu" 593 host_toolchain = "//build/toolchain/linux:$host_cpu"
588 set_default_toolchain("//build/toolchain/linux:$current_cpu") 594 set_default_toolchain("//build/toolchain/linux:$current_cpu")
589 } 595 }
590 if (is_chromeos && cros_use_custom_toolchain) { 596 if (cros_use_custom_toolchain) {
Peter Mayo 2015/08/13 01:46:46 Part of second change.
591 set_default_toolchain("//build/toolchain/cros:target") 597 set_default_toolchain("//build/toolchain/cros:target")
592 } 598 }
593 } else if (is_mac) { 599 } else if (is_mac) {
594 host_toolchain = "//build/toolchain/mac:clang_x64" 600 host_toolchain = "//build/toolchain/mac:clang_x64"
595 set_default_toolchain(host_toolchain) 601 set_default_toolchain(host_toolchain)
596 } else if (is_ios) { 602 } else if (is_ios) {
597 host_toolchain = "//build/toolchain/mac:clang_x64" 603 host_toolchain = "//build/toolchain/mac:clang_x64"
598 set_default_toolchain("//build/toolchain/mac:ios_clang_arm") 604 set_default_toolchain("//build/toolchain/mac:ios_clang_arm")
599 } else if (is_nacl) { 605 } else if (is_nacl) {
600 # TODO(GYP): This will need to change when we get NaCl working 606 # TODO(GYP): This will need to change when we get NaCl working
(...skipping 17 matching lines...) Expand all
618 forward_variables_from(invoker, "*") 624 forward_variables_from(invoker, "*")
619 625
620 # All shared libraries must have the sanitizer deps to properly link in 626 # All shared libraries must have the sanitizer deps to properly link in
621 # asan mode (this target will be empty in other cases). 627 # asan mode (this target will be empty in other cases).
622 if (!defined(deps)) { 628 if (!defined(deps)) {
623 deps = [] 629 deps = []
624 } 630 }
625 deps += [ "//build/config/sanitizers:deps" ] 631 deps += [ "//build/config/sanitizers:deps" ]
626 } 632 }
627 } 633 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698