OLD | NEW |
---|---|
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 Loading... | |
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" | |
brettw
2015/08/13 19:55:49
Given the below definition for is_chromeos, having
| |
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" && !is_chromeos_ui |
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. |
(...skipping 15 matching lines...) Expand all Loading... | |
155 # DON'T ADD MORE FLAGS HERE. Read the comment above. | 158 # DON'T ADD MORE FLAGS HERE. Read the comment above. |
156 } | 159 } |
157 | 160 |
158 # ============================================================================= | 161 # ============================================================================= |
159 # OS DEFINITIONS | 162 # OS DEFINITIONS |
160 # ============================================================================= | 163 # ============================================================================= |
161 # | 164 # |
162 # We set these various is_FOO booleans for convenience in writing OS-based | 165 # We set these various is_FOO booleans for convenience in writing OS-based |
163 # conditions. | 166 # conditions. |
164 # | 167 # |
165 # - is_android, is_chromeos, is_ios, and is_win should be obvious. | 168 # - is_android, is_chromeos_os, is_ios, and is_win should be obvious. |
brettw
2015/08/13 19:55:49
In this case, is_chromeos_os isn't so obvious, I t
| |
166 # - is_mac is set only for desktop Mac. It is not set on iOS. | 169 # - 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 | 170 # - is_posix is true for mac and any Unix-like system (basically everything |
168 # except Windows). | 171 # except Windows). |
169 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is | 172 # - 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). | 173 # generally too different despite being based on the Linux kernel). |
171 # | 174 # |
172 # Do not add more is_* variants here for random lesser-used Unix systems like | 175 # 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 | 176 # aix or one of the BSDs. If you need to check these, just check the |
174 # current_os value directly. | 177 # current_os value directly. |
175 | 178 |
176 if (current_os == "win" || current_os == "winrt_81" || | 179 if (current_os == "win" || current_os == "winrt_81" || |
177 current_os == "winrt_81_phone" || current_os == "winrt_10") { | 180 current_os == "winrt_81_phone" || current_os == "winrt_10") { |
178 is_android = false | 181 is_android = false |
179 is_chromeos = false | 182 is_chromeos_os = false |
180 is_ios = false | 183 is_ios = false |
181 is_linux = false | 184 is_linux = false |
182 is_mac = false | 185 is_mac = false |
183 is_nacl = false | 186 is_nacl = false |
184 is_posix = false | 187 is_posix = false |
185 is_win = true | 188 is_win = true |
186 } else if (current_os == "mac") { | 189 } else if (current_os == "mac") { |
187 is_android = false | 190 is_android = false |
188 is_chromeos = false | 191 is_chromeos_os = false |
189 is_ios = false | 192 is_ios = false |
190 is_linux = false | 193 is_linux = false |
191 is_mac = true | 194 is_mac = true |
192 is_nacl = false | 195 is_nacl = false |
193 is_posix = true | 196 is_posix = true |
194 is_win = false | 197 is_win = false |
195 } else if (current_os == "android") { | 198 } else if (current_os == "android") { |
196 is_android = true | 199 is_android = true |
197 is_chromeos = false | 200 is_chromeos_os = false |
198 is_ios = false | 201 is_ios = false |
199 is_linux = false | 202 is_linux = false |
200 is_mac = false | 203 is_mac = false |
201 is_nacl = false | 204 is_nacl = false |
202 is_posix = true | 205 is_posix = true |
203 is_win = false | 206 is_win = false |
204 } else if (current_os == "chromeos") { | 207 } else if (current_os == "chromeos") { |
205 is_android = false | 208 is_android = false |
206 is_chromeos = true | 209 assert(is_chromeos_ui, "ChromiumOS requires is_chromeos_ui.") |
210 is_chromeos_os = true | |
207 is_ios = false | 211 is_ios = false |
208 is_linux = true | 212 is_linux = true |
209 is_mac = false | 213 is_mac = false |
210 is_nacl = false | 214 is_nacl = false |
211 is_posix = true | 215 is_posix = true |
212 is_win = false | 216 is_win = false |
213 } else if (current_os == "nacl") { | 217 } else if (current_os == "nacl") { |
214 # current_os == "nacl" will be passed by the nacl toolchain definition. | 218 # 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 | 219 # It is not set by default or on the command line. We treat is as a |
216 # Posix variant. | 220 # Posix variant. |
217 is_android = false | 221 is_android = false |
218 is_chromeos = false | 222 is_chromeos_os = false |
219 is_ios = false | 223 is_ios = false |
220 is_linux = false | 224 is_linux = false |
221 is_mac = false | 225 is_mac = false |
222 is_nacl = true | 226 is_nacl = true |
223 is_posix = true | 227 is_posix = true |
224 is_win = false | 228 is_win = false |
225 } else if (current_os == "ios") { | 229 } else if (current_os == "ios") { |
226 is_android = false | 230 is_android = false |
227 is_chromeos = false | 231 is_chromeos_os = false |
228 is_ios = true | 232 is_ios = true |
229 is_linux = false | 233 is_linux = false |
230 is_mac = false | 234 is_mac = false |
231 is_nacl = false | 235 is_nacl = false |
232 is_posix = true | 236 is_posix = true |
233 is_win = false | 237 is_win = false |
234 } else if (current_os == "linux") { | 238 } else if (current_os == "linux") { |
235 is_android = false | 239 is_android = false |
236 is_chromeos = false | 240 is_chromeos_os = false |
237 is_ios = false | 241 is_ios = false |
238 is_linux = true | 242 is_linux = true |
239 is_mac = false | 243 is_mac = false |
240 is_nacl = false | 244 is_nacl = false |
241 is_posix = true | 245 is_posix = true |
242 is_win = false | 246 is_win = false |
243 } | 247 } |
244 | 248 |
249 # This is for backwards compatability until the rename in complete in all | |
250 # dependent files. | |
251 # TODO(petermayo): Remove this when it doesn't break known compiles. | |
252 is_chromeos = is_chromeos_ui | |
253 | |
245 # ============================================================================= | 254 # ============================================================================= |
246 # SOURCES FILTERS | 255 # SOURCES FILTERS |
247 # ============================================================================= | 256 # ============================================================================= |
248 # | 257 # |
249 # These patterns filter out platform-specific files when assigning to the | 258 # These patterns filter out platform-specific files when assigning to the |
250 # sources variable. The magic variable |sources_assignment_filter| is applied | 259 # sources variable. The magic variable |sources_assignment_filter| is applied |
251 # to each assignment or appending to the sources variable and matches are | 260 # to each assignment or appending to the sources variable and matches are |
252 # automatcally removed. | 261 # automatcally removed. |
253 # | 262 # |
254 # Note that the patterns are NOT regular expressions. Only "*" and "\b" (path | 263 # Note that the patterns are NOT regular expressions. Only "*" and "\b" (path |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
321 } | 330 } |
322 if (!is_android) { | 331 if (!is_android) { |
323 sources_assignment_filter += [ | 332 sources_assignment_filter += [ |
324 "*_android.h", | 333 "*_android.h", |
325 "*_android.cc", | 334 "*_android.cc", |
326 "*_android_unittest.h", | 335 "*_android_unittest.h", |
327 "*_android_unittest.cc", | 336 "*_android_unittest.cc", |
328 "*\bandroid/*", | 337 "*\bandroid/*", |
329 ] | 338 ] |
330 } | 339 } |
331 if (!is_chromeos) { | 340 if (!is_chromeos_ui) { |
Peter Mayo
2015/08/18 19:54:14
Is it useful to make this filter only available fr
| |
332 sources_assignment_filter += [ | 341 sources_assignment_filter += [ |
333 "*_chromeos.h", | 342 "*_chromeos.h", |
334 "*_chromeos.cc", | 343 "*_chromeos.cc", |
335 "*_chromeos_unittest.h", | 344 "*_chromeos_unittest.h", |
336 "*_chromeos_unittest.cc", | 345 "*_chromeos_unittest.cc", |
337 "*\bchromeos/*", | 346 "*\bchromeos/*", |
338 ] | 347 ] |
339 } | 348 } |
340 | 349 |
341 # DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call | 350 # DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 forward_variables_from(invoker, "*") | 627 forward_variables_from(invoker, "*") |
619 | 628 |
620 # All shared libraries must have the sanitizer deps to properly link in | 629 # All shared libraries must have the sanitizer deps to properly link in |
621 # asan mode (this target will be empty in other cases). | 630 # asan mode (this target will be empty in other cases). |
622 if (!defined(deps)) { | 631 if (!defined(deps)) { |
623 deps = [] | 632 deps = [] |
624 } | 633 } |
625 deps += [ "//build/config/sanitizers:deps" ] | 634 deps += [ "//build/config/sanitizers:deps" ] |
626 } | 635 } |
627 } | 636 } |
OLD | NEW |