[Android] Always move bookmarks at the end of child list
[chromium-blink-merge.git] / third_party / instrumented_libraries / instrumented_libraries.gyp
blobebb19e6465ae6e4ed031d09d3eba939e9503b0f2
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
3 # found in the LICENSE file.
6   'variables': {
7     'verbose_libraries_build%': 0,
8     'instrumented_libraries_jobs%': 1,
9   },
11   'ubuntu_release': '<!(lsb_release -cs)',
13   'conditions': [
14     ['asan==1', {
15       'sanitizer_type': 'asan',
16     }],
17     ['msan==1', {
18       'sanitizer_type': 'msan',
19     }],
20     ['tsan==1', {
21       'sanitizer_type': 'tsan',
22     }],
23     ['use_goma==1', {
24       'cc': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
25       'cxx': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
26     }, {
27       'cc': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
28       'cxx': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
29     }],
30   ],
32   'target_defaults': {
33     'build_method': 'destdir',
34     'extra_configure_flags': [],
35     'jobs': '<(instrumented_libraries_jobs)',
36     'package_cflags': [
37       '-O2',
38       '-gline-tables-only',
39       '-fPIC',
40       '-w',
41       '-U_FORITFY_SOURCE',
42       '-fno-omit-frame-pointer'
43     ],
44     'package_ldflags': [
45       '-Wl,-z,origin',
46       # We set RPATH=XORIGIN when building the package and replace it with
47       # $ORIGIN later. The reason is that this flag goes through configure/make
48       # differently for different packages. Because of this, we can't escape the
49       # $ character in a way that would work for every package.
50       '-Wl,-R,XORIGIN/.'
51     ],
52     'patch': '',
53     'run_before_build': '',
54     'asan_blacklist': '',
55     'msan_blacklist': '',
56     'tsan_blacklist': '',
58     'conditions': [
59       ['asan==1', {
60         'package_cflags': ['-fsanitize=address'],
61         'package_ldflags': ['-fsanitize=address'],
62       }],
63       ['msan==1', {
64         'package_cflags': [
65           '-fsanitize=memory',
66           '-fsanitize-memory-track-origins=<(msan_track_origins)'
67         ],
68         'package_ldflags': ['-fsanitize=memory'],
69       }],
70       ['tsan==1', {
71         'package_cflags': ['-fsanitize=thread'],
72         'package_ldflags': ['-fsanitize=thread'],
73       }],
74     ],
75   },
77   'targets': [
78     {
79       'target_name': 'instrumented_libraries',
80       'type': 'none',
81       'variables': {
82         'prune_self_dependency': 1,
83         # Don't add this target to the dependencies of targets with type=none.
84         'link_dependency': 1,
85       },
86       # NOTE: Please keep install-build-deps.sh in sync with this list.
87       'dependencies': [
88         '<(_sanitizer_type)-freetype',
89         '<(_sanitizer_type)-libcairo2',
90         '<(_sanitizer_type)-libexpat1',
91         '<(_sanitizer_type)-libffi6',
92         '<(_sanitizer_type)-libgcrypt11',
93         '<(_sanitizer_type)-libgpg-error0',
94         '<(_sanitizer_type)-libnspr4',
95         '<(_sanitizer_type)-libp11-kit0',
96         '<(_sanitizer_type)-libpcre3',
97         '<(_sanitizer_type)-libpng12-0',
98         '<(_sanitizer_type)-libx11-6',
99         '<(_sanitizer_type)-libxau6',
100         '<(_sanitizer_type)-libxcb1',
101         '<(_sanitizer_type)-libxcomposite1',
102         '<(_sanitizer_type)-libxcursor1',
103         '<(_sanitizer_type)-libxdamage1',
104         '<(_sanitizer_type)-libxdmcp6',
105         '<(_sanitizer_type)-libxext6',
106         '<(_sanitizer_type)-libxfixes3',
107         '<(_sanitizer_type)-libxi6',
108         '<(_sanitizer_type)-libxinerama1',
109         '<(_sanitizer_type)-libxrandr2',
110         '<(_sanitizer_type)-libxrender1',
111         '<(_sanitizer_type)-libxss1',
112         '<(_sanitizer_type)-libxtst6',
113         '<(_sanitizer_type)-zlib1g',
114         '<(_sanitizer_type)-libglib2.0-0',
115         '<(_sanitizer_type)-libdbus-1-3',
116         '<(_sanitizer_type)-libdbus-glib-1-2',
117         '<(_sanitizer_type)-nss',
118         '<(_sanitizer_type)-libfontconfig1',
119         '<(_sanitizer_type)-pulseaudio',
120         '<(_sanitizer_type)-libasound2',
121         '<(_sanitizer_type)-pango1.0',
122         '<(_sanitizer_type)-libcap2',
123         '<(_sanitizer_type)-udev',
124         '<(_sanitizer_type)-libgnome-keyring0',
125         '<(_sanitizer_type)-libgtk2.0-0',
126         '<(_sanitizer_type)-libgdk-pixbuf2.0-0',
127         '<(_sanitizer_type)-libpci3',
128         '<(_sanitizer_type)-libdbusmenu-glib4',
129         '<(_sanitizer_type)-overlay-scrollbar',
130         '<(_sanitizer_type)-libgconf-2-4',
131         '<(_sanitizer_type)-libappindicator1',
132         '<(_sanitizer_type)-libdbusmenu',
133         '<(_sanitizer_type)-atk1.0',
134         '<(_sanitizer_type)-libunity9',
135         '<(_sanitizer_type)-dee',
136         '<(_sanitizer_type)-libpixman-1-0',
137       ],
138       'conditions': [
139         ['"<(_ubuntu_release)"=="precise"', {
140           'dependencies': [
141             '<(_sanitizer_type)-libtasn1-3',
142           ],
143         }, {
144           'dependencies': [
145             '<(_sanitizer_type)-libtasn1-6',
146             '<(_sanitizer_type)-harfbuzz',
147           ],
148         }],
149         ['msan==1', {
150           'dependencies': [
151             '<(_sanitizer_type)-libcups2',
152           ],
153         }],
154         ['tsan==1', {
155           'dependencies!': [
156             '<(_sanitizer_type)-libpng12-0',
157           ],
158         }],
159       ],
160       'direct_dependent_settings': {
161         'target_conditions': [
162           ['_toolset=="target"', {
163             'ldflags': [
164               # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
165               '-Wl,-R,\$$ORIGIN/instrumented_libraries/<(_sanitizer_type)/lib/',
166               '-Wl,-z,origin',
167             ],
168           }],
169         ],
170       },
171     },
172     {
173       'package_name': 'freetype',
174       'dependencies=': [],
175       'run_before_build': 'scripts/freetype.sh',
176       'includes': ['standard_instrumented_package_target.gypi'],
177     },
178     {
179       'package_name': 'libcairo2',
180       'dependencies=': [],
181       'extra_configure_flags': ['--disable-gtk-doc'],
182       'includes': ['standard_instrumented_package_target.gypi'],
183     },
184     {
185       'package_name': 'libdbus-1-3',
186       'dependencies=': [],
187       'includes': ['standard_instrumented_package_target.gypi'],
188     },
189     {
190       'package_name': 'libdbus-glib-1-2',
191       'dependencies=': [],
192       # Use system dbus-binding-tool. The just-built one is instrumented but
193       # doesn't have the correct RPATH, and will crash.
194       'extra_configure_flags': ['--with-dbus-binding-tool=dbus-binding-tool'],
195       'includes': ['standard_instrumented_package_target.gypi'],
196     },
197     {
198       'package_name': 'libexpat1',
199       'dependencies=': [],
200       'includes': ['standard_instrumented_package_target.gypi'],
201     },
202     {
203       'package_name': 'libffi6',
204       'dependencies=': [],
205       'includes': ['standard_instrumented_package_target.gypi'],
206     },
207     {
208       'package_name': 'libfontconfig1',
209       'dependencies=': [],
210       'extra_configure_flags': [
211         '--disable-docs',
212         '--sysconfdir=/etc/',
213         # From debian/rules.
214         '--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts',
215       ],
216       'conditions': [
217         ['"<(_ubuntu_release)"=="precise"', {
218           'patch': 'patches/libfontconfig.precise.diff',
219         }, {
220           'patch': 'patches/libfontconfig.trusty.diff',
221         }],
222       ],
223       'includes': ['standard_instrumented_package_target.gypi'],
224     },
225     {
226       'package_name': 'libgcrypt11',
227       'dependencies=': [],
228       'package_ldflags': ['-Wl,-z,muldefs'],
229       'extra_configure_flags': [
230         # From debian/rules.
231         '--enable-noexecstack',
232         '--enable-ld-version-script',
233         '--enable-static',
234         # http://crbug.com/344505
235         '--disable-asm'
236       ],
237       'includes': ['standard_instrumented_package_target.gypi'],
238     },
239     {
240       'package_name': 'libglib2.0-0',
241       'dependencies=': [],
242       'extra_configure_flags': [
243         '--disable-gtk-doc',
244         '--disable-gtk-doc-html',
245         '--disable-gtk-doc-pdf',
246       ],
247       'asan_blacklist': 'blacklists/asan/libglib2.0-0.txt',
248       'msan_blacklist': 'blacklists/msan/libglib2.0-0.txt',
249       'run_before_build': 'scripts/autogen.sh',
250       'includes': ['standard_instrumented_package_target.gypi'],
251     },
252     {
253       'package_name': 'libgpg-error0',
254       'dependencies=': [],
255       'includes': ['standard_instrumented_package_target.gypi'],
256     },
257     {
258       'package_name': 'libnspr4',
259       'dependencies=': [],
260       'extra_configure_flags': [
261         '--enable-64bit',
262         # TSan reports data races on debug variables.
263         '--disable-debug',
264       ],
265       'run_before_build': 'scripts/libnspr4.sh',
266       'includes': ['standard_instrumented_package_target.gypi'],
267     },
268     {
269       'package_name': 'libp11-kit0',
270       'dependencies=': [],
271       # Required on Trusty due to autoconf version mismatch.
272       'run_before_build': 'scripts/autoreconf.sh',
273       'includes': ['standard_instrumented_package_target.gypi'],
274     },
275     {
276       'package_name': 'libpcre3',
277       'dependencies=': [],
278       'extra_configure_flags': [
279         '--enable-utf8',
280         '--enable-unicode-properties',
281       ],
282       'includes': ['standard_instrumented_package_target.gypi'],
283     },
284     {
285       'package_name': 'libpixman-1-0',
286       'dependencies=': [],
287       'extra_configure_flags': [
288         # From debian/rules.
289         '--disable-gtk',
290         '--disable-silent-rules',
291       ],
292       'patch': 'patches/libpixman-1-0.diff',
293       'includes': ['standard_instrumented_package_target.gypi'],
294     },
295     {
296       'package_name': 'libpng12-0',
297       'dependencies=': [],
298       'includes': ['standard_instrumented_package_target.gypi'],
299     },
300     {
301       'package_name': 'libx11-6',
302       'dependencies=': [],
303       'extra_configure_flags': ['--disable-specs'],
304       'msan_blacklist': 'blacklists/msan/libx11-6.txt',
305       # Required on Trusty due to autoconf version mismatch.
306       'run_before_build': 'scripts/autoreconf.sh',
307       'includes': ['standard_instrumented_package_target.gypi'],
308     },
309     {
310       'package_name': 'libxau6',
311       'dependencies=': [],
312       'includes': ['standard_instrumented_package_target.gypi'],
313     },
314     {
315       'package_name': 'libxcb1',
316       'dependencies=': [],
317       'extra_configure_flags': ['--disable-build-docs'],
318       # Required on Trusty due to autoconf version mismatch.
319       'run_before_build': 'scripts/autoreconf.sh',
320       'includes': ['standard_instrumented_package_target.gypi'],
321     },
322     {
323       'package_name': 'libxcomposite1',
324       'dependencies=': [],
325       'includes': ['standard_instrumented_package_target.gypi'],
326     },
327     {
328       'package_name': 'libxcursor1',
329       'dependencies=': [],
330       'includes': ['standard_instrumented_package_target.gypi'],
331     },
332     {
333       'package_name': 'libxdamage1',
334       'dependencies=': [],
335       'includes': ['standard_instrumented_package_target.gypi'],
336     },
337     {
338       'package_name': 'libxdmcp6',
339       'dependencies=': [],
340       'extra_configure_flags': ['--disable-docs'],
341       'includes': ['standard_instrumented_package_target.gypi'],
342     },
343     {
344       'package_name': 'libxext6',
345       'dependencies=': [],
346       'extra_configure_flags': ['--disable-specs'],
347       'includes': ['standard_instrumented_package_target.gypi'],
348     },
349     {
350       'package_name': 'libxfixes3',
351       'dependencies=': [],
352       'includes': ['standard_instrumented_package_target.gypi'],
353     },
354     {
355       'package_name': 'libxi6',
356       'dependencies=': [],
357       'extra_configure_flags': [
358         '--disable-specs',
359         '--disable-docs',
360       ],
361       'includes': ['standard_instrumented_package_target.gypi'],
362     },
363     {
364       'package_name': 'libxinerama1',
365       'dependencies=': [],
366       'includes': ['standard_instrumented_package_target.gypi'],
367     },
368     {
369       'package_name': 'libxrandr2',
370       'dependencies=': [],
371       'includes': ['standard_instrumented_package_target.gypi'],
372     },
373     {
374       'package_name': 'libxrender1',
375       'dependencies=': [],
376       'includes': ['standard_instrumented_package_target.gypi'],
377     },
378     {
379       'package_name': 'libxss1',
380       'dependencies=': [],
381       'includes': ['standard_instrumented_package_target.gypi'],
382     },
383     {
384       'package_name': 'libxtst6',
385       'dependencies=': [],
386       'extra_configure_flags': ['--disable-specs'],
387       'includes': ['standard_instrumented_package_target.gypi'],
388     },
389     {
390       'package_name': 'zlib1g',
391       'dependencies=': [],
392       'patch': 'patches/zlib1g.diff',
393       'includes': ['standard_instrumented_package_target.gypi'],
394     },
395     {
396       'package_name': 'nss',
397       'dependencies=': [
398         # TODO(earthdok): get rid of this dependency
399         '<(_sanitizer_type)-libnspr4',
400       ],
401       'patch': 'patches/nss.diff',
402       'build_method': 'custom_nss',
403       'includes': ['standard_instrumented_package_target.gypi'],
404     },
405     {
406       'package_name': 'pulseaudio',
407       'dependencies=': [],
408       'conditions': [
409         ['"<(_ubuntu_release)"=="precise"', {
410           'patch': 'patches/pulseaudio.precise.diff',
411           'jobs': 1,
412         }, {
413           # New location of libpulsecommon.
414           'package_ldflags': [ '-Wl,-R,XORIGIN/pulseaudio/.' ],
415         }],
416       ],
417       'extra_configure_flags': [
418           # From debian/rules.
419           '--enable-x11',
420           '--disable-hal-compat',
421           # Disable some ARM-related code that fails compilation. No idea why
422           # this even impacts x86-64 builds.
423           '--disable-neon-opt'
424       ],
425       'run_before_build': 'scripts/pulseaudio.sh',
426       'includes': ['standard_instrumented_package_target.gypi'],
427     },
428     {
429       'package_name': 'libasound2',
430       'dependencies=': [],
431       'run_before_build': 'scripts/libasound2.sh',
432       'includes': ['standard_instrumented_package_target.gypi'],
433     },
434     {
435       'package_name': 'libcups2',
436       'dependencies=': [],
437       'patch': 'patches/libcups2.diff',
438       'jobs': 1,
439       'extra_configure_flags': [
440         # All from debian/rules.
441         '--localedir=/usr/share/cups/locale',
442         '--enable-slp',
443         '--enable-libpaper',
444         '--enable-ssl',
445         '--enable-gnutls',
446         '--disable-openssl',
447         '--enable-threads',
448         '--enable-static',
449         '--enable-debug',
450         '--enable-dbus',
451         '--with-dbusdir=/etc/dbus-1',
452         '--enable-gssapi',
453         '--enable-avahi',
454         '--with-pdftops=/usr/bin/gs',
455         '--disable-launchd',
456         '--with-cups-group=lp',
457         '--with-system-groups=lpadmin',
458         '--with-printcap=/var/run/cups/printcap',
459         '--with-log-file-perm=0640',
460         '--with-local_protocols="CUPS dnssd"',
461         '--with-remote_protocols="CUPS dnssd"',
462         '--enable-libusb',
463       ],
464       'includes': ['standard_instrumented_package_target.gypi'],
465     },
466     {
467       'package_name': 'pango1.0',
468       'dependencies=': [],
469       'extra_configure_flags': [
470         # Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620
471         '--enable-introspection=no',
472         # Pango is normally used with dynamically loaded modules. However,
473         # ensuring pango is able to find instrumented versions of those modules
474         # is a huge pain in the neck. Let's link them statically instead, and
475         # hope for the best.
476         '--with-included-modules=yes'
477       ],
478       'includes': ['standard_instrumented_package_target.gypi'],
479     },
480     {
481       'package_name': 'libcap2',
482       'dependencies=': [],
483       'build_method': 'custom_libcap',
484       'includes': ['standard_instrumented_package_target.gypi'],
485     },
486     {
487       'package_name': 'udev',
488       'dependencies=': [],
489       'extra_configure_flags': [
490           # Without this flag there's a linking step that doesn't honor LDFLAGS
491           # and fails.
492           # TODO(earthdok): find a better fix.
493           '--disable-gudev'
494       ],
495       'run_before_build': 'scripts/udev.sh',
496       'includes': ['standard_instrumented_package_target.gypi'],
497     },
498     {
499       'package_name': 'libtasn1-3',
500       'dependencies=': [],
501       'extra_configure_flags': [
502           # From debian/rules.
503           '--enable-ld-version-script',
504       ],
505       'includes': ['standard_instrumented_package_target.gypi'],
506     },
507     {
508       'package_name': 'libtasn1-6',
509       'dependencies=': [],
510       'extra_configure_flags': [
511           # From debian/rules.
512           '--enable-ld-version-script',
513       ],
514       'includes': ['standard_instrumented_package_target.gypi'],
515     },
516     {
517       'package_name': 'libgnome-keyring0',
518       'extra_configure_flags': [
519           # Build static libs (from debian/rules).
520           '--enable-static',
521           '--enable-tests=no',
522           # Make the build less problematic.
523           '--disable-introspection',
524       ],
525       'package_ldflags': ['-Wl,--as-needed'],
526       'dependencies=': [],
527       'includes': ['standard_instrumented_package_target.gypi'],
528     },
529     {
530       'package_name': 'libgtk2.0-0',
531       'package_cflags': ['-Wno-return-type'],
532       'extra_configure_flags': [
533           # From debian/rules.
534           '--prefix=/usr',
535           '--sysconfdir=/etc',
536           '--enable-test-print-backend',
537           '--enable-introspection=no',
538           '--with-xinput=yes',
539       ],
540       'dependencies=': [],
541       'conditions': [
542         ['"<(_ubuntu_release)"=="precise"', {
543           'patch': 'patches/libgtk2.0-0.precise.diff',
544         }, {
545           'patch': 'patches/libgtk2.0-0.trusty.diff',
546         }],
547       ],
548       'run_before_build': 'scripts/libgtk2.0-0.sh',
549       'includes': ['standard_instrumented_package_target.gypi'],
550     },
551     {
552       'package_name': 'libgdk-pixbuf2.0-0',
553       'extra_configure_flags': [
554           # From debian/rules.
555           '--with-libjasper',
556           '--with-x11',
557           # Make the build less problematic.
558           '--disable-introspection',
559       ],
560       'dependencies=': [],
561       'run_before_build': 'scripts/libgdk-pixbuf2.0-0.sh',
562       'includes': ['standard_instrumented_package_target.gypi'],
563     },
564     {
565       'package_name': 'libpci3',
566       'dependencies=': [],
567       'build_method': 'custom_libpci3',
568       'jobs': 1,
569       'includes': ['standard_instrumented_package_target.gypi'],
570     },
571     {
572       'package_name': 'libdbusmenu-glib4',
573       'extra_configure_flags': [
574           # From debian/rules.
575           '--disable-scrollkeeper',
576           '--enable-gtk-doc',
577           # --enable-introspection introduces a build step that attempts to run
578           # a just-built binary and crashes. Vala requires introspection.
579           # TODO(earthdok): find a better fix.
580           '--disable-introspection',
581           '--disable-vala',
582       ],
583       'dependencies=': [],
584       'run_before_build': 'scripts/autogen.sh',
585       'includes': ['standard_instrumented_package_target.gypi'],
586     },
587     {
588       'package_name': 'overlay-scrollbar',
589       'extra_configure_flags': [
590           '--with-gtk=2',
591       ],
592       'dependencies=': [],
593       'run_before_build': 'scripts/autogen.sh',
594       'includes': ['standard_instrumented_package_target.gypi'],
595     },
596     {
597       'package_name': 'libgconf-2-4',
598       'extra_configure_flags': [
599           # From debian/rules. (Even though --with-gtk=3.0 doesn't make sense.)
600           '--with-gtk=3.0',
601           '--disable-orbit',
602           # See above.
603           '--disable-introspection',
604       ],
605       'dependencies=': [],
606       'includes': ['standard_instrumented_package_target.gypi'],
607     },
608     {
609       'package_name': 'libappindicator1',
610       'extra_configure_flags': [
611           # See above.
612           '--disable-introspection',
613       ],
614       'dependencies=': [],
615       'jobs': 1,
616       'run_before_build': 'scripts/autogen.sh',
617       'includes': ['standard_instrumented_package_target.gypi'],
618     },
619     {
620       'package_name': 'libdbusmenu',
621       'extra_configure_flags': [
622           # From debian/rules.
623           '--disable-scrollkeeper',
624           '--with-gtk=2',
625           # See above.
626           '--disable-introspection',
627           '--disable-vala',
628       ],
629       'dependencies=': [],
630       'run_before_build': 'scripts/autogen.sh',
631       'includes': ['standard_instrumented_package_target.gypi'],
632     },
633     {
634       'package_name': 'atk1.0',
635       'extra_configure_flags': [
636           # See above.
637           '--disable-introspection',
638       ],
639       'dependencies=': [],
640       'includes': ['standard_instrumented_package_target.gypi'],
641     },
642     {
643       'package_name': 'libunity9',
644       'dependencies=': [],
645       'run_before_build': 'scripts/autogen.sh',
646       'includes': ['standard_instrumented_package_target.gypi'],
647     },
648     {
649       'package_name': 'dee',
650       'extra_configure_flags': [
651           # See above.
652           '--disable-introspection',
653       ],
654       'dependencies=': [],
655       'run_before_build': 'scripts/autogen.sh',
656       'includes': ['standard_instrumented_package_target.gypi'],
657     },
658     {
659       'package_name': 'harfbuzz',
660       'package_cflags': ['-Wno-c++11-narrowing'],
661       'extra_configure_flags': [
662           # From debian/rules.
663           '--with-graphite2=yes',
664           '--with-gobject',
665           # See above.
666           '--disable-introspection',
667       ],
668       'dependencies=': [],
669       'includes': ['standard_instrumented_package_target.gypi'],
670     },
671   ],