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