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 import("//build/config/allocator.gni") | 5 import("//build/config/allocator.gni") |
6 import("//build/config/crypto.gni") | 6 import("//build/config/crypto.gni") |
7 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
8 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
9 | 9 |
10 declare_args() { | 10 declare_args() { |
(...skipping 12 matching lines...) Expand all Loading... |
23 # TODO(brettw) Most of these should be removed. Instead of global feature | 23 # TODO(brettw) Most of these should be removed. Instead of global feature |
24 # flags, we should have more modular flags that apply only to a target and its | 24 # flags, we should have more modular flags that apply only to a target and its |
25 # dependents. For example, depending on the "x11" meta-target should define | 25 # dependents. For example, depending on the "x11" meta-target should define |
26 # USE_X11 for all dependents so that everything that could use X11 gets the | 26 # USE_X11 for all dependents so that everything that could use X11 gets the |
27 # define, but anything that doesn't depend on X11 doesn't see it. | 27 # define, but anything that doesn't depend on X11 doesn't see it. |
28 # | 28 # |
29 # For now we define these globally to match the current GYP build. | 29 # For now we define these globally to match the current GYP build. |
30 config("feature_flags") { | 30 config("feature_flags") { |
31 # TODO(brettw) most of these need to be parameterized. | 31 # TODO(brettw) most of these need to be parameterized. |
32 defines = [ | 32 defines = [ |
33 "CHROMIUM_BUILD", | 33 "CHROMIUM_BUILD", |
34 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. | 34 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. |
35 ] | 35 ] |
36 | 36 |
37 if (cld_version > 0) { | 37 if (cld_version > 0) { |
38 defines += [ "CLD_VERSION=$cld_version" ] | 38 defines += [ "CLD_VERSION=$cld_version" ] |
39 } | 39 } |
40 if (enable_mdns) { | 40 if (enable_mdns) { |
41 defines += [ "ENABLE_MDNS=1" ] | 41 defines += [ "ENABLE_MDNS=1" ] |
42 } | 42 } |
43 if (enable_notifications) { | 43 if (enable_notifications) { |
44 defines += [ "ENABLE_NOTIFICATIONS" ] | 44 defines += [ "ENABLE_NOTIFICATIONS" ] |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } else if (is_linux && !is_android && cpu_arch == "x64" && | 224 } else if (is_linux && !is_android && cpu_arch == "x64" && |
225 !disable_iterator_debugging) { | 225 !disable_iterator_debugging) { |
226 # Enable libstdc++ debugging facilities to help catch problems early, see | 226 # Enable libstdc++ debugging facilities to help catch problems early, see |
227 # http://crbug.com/65151 . | 227 # http://crbug.com/65151 . |
228 # TODO(phajdan.jr): Should we enable this for all of POSIX? | 228 # TODO(phajdan.jr): Should we enable this for all of POSIX? |
229 defines += [ "_GLIBCXX_DEBUG=1" ] | 229 defines += [ "_GLIBCXX_DEBUG=1" ] |
230 } | 230 } |
231 } | 231 } |
232 | 232 |
233 config("release") { | 233 config("release") { |
234 defines = [ | 234 defines = [ "NDEBUG" ] |
235 "NDEBUG", | |
236 ] | |
237 } | 235 } |
238 | 236 |
239 # Default libraries ------------------------------------------------------------ | 237 # Default libraries ------------------------------------------------------------ |
240 | 238 |
241 # This config defines the default libraries applied to all targets. | 239 # This config defines the default libraries applied to all targets. |
242 config("default_libs") { | 240 config("default_libs") { |
243 if (is_win) { | 241 if (is_win) { |
244 # TODO(brettw) this list of defaults should probably be smaller, and | 242 # TODO(brettw) this list of defaults should probably be smaller, and |
245 # instead the targets that use the less common ones (e.g. wininet or | 243 # instead the targets that use the less common ones (e.g. wininet or |
246 # winspool) should include those explicitly. | 244 # winspool) should include those explicitly. |
(...skipping 14 matching lines...) Expand all Loading... |
261 "shell32.lib", | 259 "shell32.lib", |
262 "shlwapi.lib", | 260 "shlwapi.lib", |
263 "user32.lib", | 261 "user32.lib", |
264 "usp10.lib", | 262 "usp10.lib", |
265 "uuid.lib", | 263 "uuid.lib", |
266 "version.lib", | 264 "version.lib", |
267 "wininet.lib", | 265 "wininet.lib", |
268 "winmm.lib", | 266 "winmm.lib", |
269 "winspool.lib", | 267 "winspool.lib", |
270 "ws2_32.lib", | 268 "ws2_32.lib", |
| 269 |
271 # Please don't add more stuff here. We should actually be making this | 270 # Please don't add more stuff here. We should actually be making this |
272 # list smaller, since all common things should be covered. If you need | 271 # list smaller, since all common things should be covered. If you need |
273 # some extra libraries, please just add a libs = [ "foo.lib" ] to your | 272 # some extra libraries, please just add a libs = [ "foo.lib" ] to your |
274 # target that needs it. | 273 # target that needs it. |
275 ] | 274 ] |
276 } else if (is_android) { | 275 } else if (is_android) { |
277 # Android uses -nostdlib so we need to add even libc here. | 276 # Android uses -nostdlib so we need to add even libc here. |
278 libs = [ | 277 libs = [ |
279 # TODO(brettw) write a version of this, hopefully we can express this | 278 # TODO(brettw) write a version of this, hopefully we can express this |
280 # without forking out to GCC just to get the library name. The android | 279 # without forking out to GCC just to get the library name. The android |
281 # toolchain directory should probably be extracted into a .gni file that | 280 # toolchain directory should probably be extracted into a .gni file that |
282 # this file and the android toolchain .gn file can share. | 281 # this file and the android toolchain .gn file can share. |
283 # # Manually link the libgcc.a that the cross compiler uses. | 282 # # Manually link the libgcc.a that the cross compiler uses. |
284 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 283 # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
285 "c", | 284 "c", |
286 "dl", | 285 "dl", |
287 "m" | 286 "m", |
288 ] | 287 ] |
289 } else if (is_mac) { | 288 } else if (is_mac) { |
290 libs = [ | 289 libs = [ |
291 "AppKit.framework", | 290 "AppKit.framework", |
292 "ApplicationServices.framework", | 291 "ApplicationServices.framework", |
293 "Carbon.framework", | 292 "Carbon.framework", |
294 "CoreFoundation.framework", | 293 "CoreFoundation.framework", |
295 "Foundation.framework", | 294 "Foundation.framework", |
296 "IOKit.framework", | 295 "IOKit.framework", |
297 "Security.framework", | 296 "Security.framework", |
298 ] | 297 ] |
299 } else if (is_ios) { | 298 } else if (is_ios) { |
300 libs = [ | 299 libs = [ |
301 "CoreFoundation.framework", | 300 "CoreFoundation.framework", |
302 "CoreGraphics.framework", | 301 "CoreGraphics.framework", |
303 "CoreText.framework", | 302 "CoreText.framework", |
304 "Foundation.framework", | 303 "Foundation.framework", |
305 "UIKit.framework", | 304 "UIKit.framework", |
306 ] | 305 ] |
307 } else if (is_linux) { | 306 } else if (is_linux) { |
308 libs = [ | 307 libs = [ "dl" ] |
309 "dl", | |
310 ] | |
311 } | 308 } |
312 } | 309 } |
OLD | NEW |