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

Side by Side Diff: third_party/instrumented_libraries/BUILD.gn

Issue 2103683002: Add GN rules for building instrumented libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 import("//build/toolchain/goma.gni")
7
8 declare_args() {
9 # The default number of jobs to use when building instrumented libraries.
10 instrumented_libraries_jobs = 8
11
12 # The platform on which the instrumented libraries are being built.
13 instrumented_libraries_platform = "trusty"
14 }
6 15
7 group("deps") { 16 group("deps") {
8 if (use_prebuilt_instrumented_libraries) { 17 if (use_prebuilt_instrumented_libraries) {
9 assert(prebuilt_instrumented_libraries_available, 18 assert(prebuilt_instrumented_libraries_available,
10 "Prebuilt instrumented libraries are only available when " + 19 "Prebuilt instrumented libraries are only available when " +
11 "is_msan = true and msan_track_origins = {0, 2}") 20 "is_msan = true and msan_track_origins = {0, 2}")
12 deps = [ 21 deps = [
13 ":prebuilt", 22 ":prebuilt",
14 ] 23 ]
15 data_deps = [ 24 data_deps = [
16 ":prebuilt", 25 ":prebuilt",
17 ] 26 ]
18 } 27 }
28 if (use_locally_built_instrumented_libraries) {
29 deps = [
30 ":locally_built",
31 ]
32 }
19 } 33 }
20 34
35 if (is_msan) {
36 sanitizer_type = "msan"
37 } else if (is_asan) {
38 sanitizer_type = "asan"
39 } else if (is_tsan) {
40 sanitizer_type = "tsan"
41 }
42
21 if (prebuilt_instrumented_libraries_available) { 43 if (prebuilt_instrumented_libraries_available) {
22 group("prebuilt") { 44 group("prebuilt") {
23 visibility = [ ":deps" ] 45 visibility = [ ":deps" ]
24 46
25 deps = [ 47 deps = [
26 ":extract_prebuilt_instrumented_libraries", 48 ":extract_prebuilt_instrumented_libraries",
27 ] 49 ]
28 data_deps = [ 50 data_deps = [
29 ":extract_prebuilt_instrumented_libraries", 51 ":extract_prebuilt_instrumented_libraries",
30 ] 52 ]
31 } 53 }
32 54
33 if (is_msan) { 55 if (is_msan) {
34 sanitizer_type = "msan"
35 if (msan_track_origins == 0) { 56 if (msan_track_origins == 0) {
36 archive_prefix = "msan-no-origins" 57 archive_prefix = "msan-no-origins"
37 } else if (msan_track_origins == 2) { 58 } else if (msan_track_origins == 2) {
38 archive_prefix = "msan-chained-origins" 59 archive_prefix = "msan-chained-origins"
39 } 60 }
40 } 61 }
41 62
42 # TODO(GYP): scripts/download_binaries.py uses GYP_DEFINES to decide whether 63 # TODO(GYP): scripts/download_binaries.py uses GYP_DEFINES to decide whether
43 # to download the archives extracted here. 64 # to download the archives extracted here.
44 # Note: This requires a clobber whenever Ubuntu version changes. 65 # Note: This requires a clobber whenever Ubuntu version changes.
45 action("extract_prebuilt_instrumented_libraries") { 66 action("extract_prebuilt_instrumented_libraries") {
46 visibility = [ ":prebuilt" ] 67 visibility = [ ":prebuilt" ]
47 script = "scripts/unpack_binaries.py" 68 script = "scripts/unpack_binaries.py"
48 depfile = "$target_out_dir/$archive_prefix.d" 69 depfile = "$target_out_dir/$archive_prefix.d"
49 args = [ 70 args = [
50 archive_prefix, 71 archive_prefix,
51 rebase_path("binaries"), 72 rebase_path("binaries"),
52 rebase_path(root_build_dir + "/instrumented_libraries_prebuilt"), 73 rebase_path(root_out_dir + "/instrumented_libraries_prebuilt"),
53 rebase_path(target_out_dir, root_build_dir), 74 rebase_path(target_out_dir, root_out_dir),
54 ] 75 ]
55 outputs = [ 76 outputs = [
56 "$target_out_dir/$archive_prefix.txt", 77 "$target_out_dir/$archive_prefix.txt",
57 ] 78 ]
58 data = [ 79 data = [
59 "$root_out_dir/instrumented_libraries_prebuilt/", 80 "$root_out_dir/instrumented_libraries_prebuilt/",
60 ] 81 ]
61 } 82 }
62 83
63 config("prebuilt_ldflags") { 84 config("prebuilt_ldflags") {
64 ldflags = [ 85 ldflags = [
65 # Add a relative RPATH entry to Chromium binaries. This puts instrumented 86 # Add a relative RPATH entry to Chromium binaries. This puts instrumented
66 # DSOs before system-installed versions in library search path. 87 # DSOs before system-installed versions in library search path.
67 "-Wl,-R,\$ORIGIN/instrumented_libraries_prebuilt/$sanitizer_type/lib", 88 "-Wl,-R,\$ORIGIN/instrumented_libraries_prebuilt/$sanitizer_type/lib",
68 "-Wl,-z,origin", 89 "-Wl,-z,origin",
69 ] 90 ]
70 } 91 }
71 } 92 }
72 # TODO(GYP): Support building instrumented libraries from source. 93
94 if (use_locally_built_instrumented_libraries) {
95 if (instrumented_libraries_platform == "precise") {
96 is_precise = true
97 is_trusty = false
98 } else if (instrumented_libraries_platform == "trusty") {
99 is_precise = false
100 is_trusty = true
101 } else {
102 assert(false, "Unsupported platform " + instrumented_libraries_platform)
103 }
104 group("locally_built") {
105 visibility = [ ":deps" ]
106 deps = [
107 ":atk1.0",
108 ":brltty",
109 ":dee",
110 ":freetype",
111 ":libappindicator1",
112 ":libasound2",
113 ":libcairo2",
114 ":libcap2",
115 ":libcredentialkit_pkcs11",
116 ":libdbus-1-3",
117 ":libdbus-glib-1-2",
118 ":libdbusmenu",
119 ":libdbusmenu-glib4",
120 ":libexpat1",
121 ":libffi6",
122 ":libfontconfig1",
123 ":libgconf-2-4",
124 ":libgcrypt11",
125 ":libgdk-pixbuf2.0-0",
126 ":libglib2.0-0",
127 ":libgnome-keyring0",
128 ":libgpg-error0",
129 ":libgtk2.0-0",
130 ":libnspr4",
131 ":libp11-kit0",
132 ":libpci3",
133 ":libpcre3",
134 ":libpixman-1-0",
135 ":libunity9",
136 ":libva1",
137 ":libx11-6",
138 ":libxau6",
139 ":libxcb1",
140 ":libxcomposite1",
141 ":libxcursor1",
142 ":libxdamage1",
143 ":libxdmcp6",
144 ":libxext6",
145 ":libxfixes3",
146 ":libxi6",
147 ":libxinerama1",
148 ":libxrandr2",
149 ":libxrender1",
150 ":libxss1",
151 ":libxtst6",
152 ":nss",
153 ":pango1.0",
154 ":pulseaudio",
155 ":udev",
156 ":zlib1g",
157 ]
158 if (is_precise) {
159 deps += [ ":libtasn1-3" ]
160 }
161 if (is_trusty) {
162 deps += [
163 ":harfbuzz",
164 ":libsecret",
165 ":libtasn1-6",
166 ]
167 }
168 if (is_msan) {
169 deps += [ ":libcups2" ]
170 }
171 if (!is_tsan) {
172 deps += [ ":libpng12-0" ]
173 }
174 data = [
175 "${root_out_dir}/instrumented_libraries/${sanitizer_type}/lib",
176 ]
177 }
178
179 config("locally_built_ldflags") {
180 ldflags = [
181 # Add a relative RPATH entry to Chromium binaries. This puts instrumented
182 # DSOs before system-installed versions in library search path.
183 "-Wl,-R,\$ORIGIN/instrumented_libraries/${sanitizer_type}/lib",
184 "-Wl,-z,origin",
185 ]
186 }
187
188 template("instrumented_library") {
189 action(target_name) {
190 script = "scripts/download_build_install.py"
191 build_method = "destdir"
192 if (defined(invoker.build_method)) {
193 build_method = invoker.build_method
194 }
195
196 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang")
197 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++")
198 if (use_goma) {
199 cc = "${goma_dir}/gomacc ${cc}"
200 cxx = "${goma_dir}/gomacc ${cxx}"
201 }
202 jobs = instrumented_libraries_jobs
203 if (defined(invoker.jobs)) {
204 jobs = invoker.jobs
205 }
206 package_cflags = [
207 "-O2",
208 "-gline-tables-only",
209 "-fPIC",
210 "-w",
211 "-U_FORITFY_SOURCE",
212 "-fno-omit-frame-pointer",
213 ]
214 package_ldflags = []
215 if (is_asan) {
216 package_cflags += [ "-fsanitize=address" ]
217 package_ldflags = [ "-fsanitize=address" ]
218 } else if (is_msan) {
219 package_cflags += [
220 "-fsanitize=memory",
221 "-fsanitize-memory-track-origins=${msan_track_origins}",
222 ]
223 package_ldflags = [ "-fsanitize=memory" ]
224 } else if (is_tsan) {
225 package_cflags += [ "-fsanitize=thread" ]
226 package_ldflags = [ "-fsanitize=thread" ]
227 }
228 if (defined(invoker.package_cflags)) {
229 package_cflags += invoker.package_cflags
230 }
231 if (defined(invoker.package_ldflags)) {
232 package_ldflags += invoker.package_ldflags
233 }
234 if (defined(invoker.deps)) {
235 deps = invoker.deps
236 }
237 product_dir = rebase_path(root_out_dir)
238 intermediate_dir = rebase_path(target_gen_dir)
239 args = [
240 "--build-method=${build_method}",
241 "--cc=${cc}",
242 "--cxx=${cxx}",
243 "--intermediate-dir=${intermediate_dir}",
244 "--jobs=${jobs}",
245 "--libdir=lib",
246 "--package=${target_name}",
247 "--product-dir=${product_dir}",
248 "--cflags=${package_cflags}",
249 "--ldflags=${package_ldflags}",
250 "--sanitizer=${sanitizer_type}",
251 ]
252 outputs = [
253 "${root_out_dir}/instrumented_libraries/${sanitizer_type}/${target_name} .txt",
254 ]
255 inputs = []
256 if (defined(invoker.pre_build)) {
257 inputs += [ invoker.pre_build ]
258 args += [ "--pre-build=${invoker.pre_build}" ]
259 }
260 if (defined(invoker.patch)) {
261 inputs += [ invoker.patch ]
262 args += [ "--patch=${invoker.patch}" ]
263 }
264 if (defined(invoker.asan_blacklist)) {
265 if (is_asan) {
266 inputs += [ invoker.asan_blacklist ]
267 args += [ "--sanitizer-blacklist=${invoker.asan_blacklist}" ]
268 } else {
269 assert(invoker.asan_blacklist != "", "")
270 }
271 }
272 if (defined(invoker.msan_blacklist)) {
273 if (is_msan) {
274 inputs += [ invoker.msan_blacklist ]
275 args += [ "--sanitizer-blacklist=${invoker.msan_blacklist}" ]
276 } else {
277 assert(invoker.msan_blacklist != "", "")
278 }
279 }
280
281 if (defined(invoker.extra_configure_flags)) {
282 args += [ "--extra-configure-flags=${invoker.extra_configure_flags}" ]
283 }
284 }
285 }
286
287 instrumented_library("atk1.0") {
288 extra_configure_flags = [
289 "--disable-static",
290
291 # See above.
292 "--disable-introspection",
293 ]
294 }
295
296 instrumented_library("brltty") {
297 extra_configure_flags = [
298 "--disable-static",
299
300 # From debian/rules.
301 "--without-viavoice",
302 "--without-theta",
303 "--without-swift",
304 "--bindir=/sbin",
305 "--with-curses=ncursesw",
306 "--disable-stripping",
307
308 # We don't need any of those.
309 "--disable-java-bindings",
310 "--disable-lisp-bindings",
311 "--disable-ocaml-bindings",
312 "--disable-python-bindings",
313 "--disable-tcl-bindings",
314 ]
315 }
316
317 instrumented_library("dee") {
318 extra_configure_flags = [
319 "--disable-static",
320
321 # See above.
322 "--disable-introspection",
323 ]
324 pre_build = "scripts/pre-build/autogen.sh"
325 }
326
327 instrumented_library("freetype") {
328 pre_build = "scripts/pre-build/freetype.sh"
329 extra_configure_flags = [ "--disable-static" ]
330 }
331
332 instrumented_library("harfbuzz") {
333 package_cflags = [ "-Wno-c++11-narrowing" ]
334 extra_configure_flags = [
335 "--disable-static",
336
337 # From debian/rules.
338 "--with-graphite2=yes",
339 "--with-gobject",
340
341 # See above.
342 "--disable-introspection",
343 ]
344 }
345
346 instrumented_library("libappindicator1") {
347 extra_configure_flags = [
348 "--disable-static",
349
350 # See above.
351 "--disable-introspection",
352 ]
353 jobs = 1
354 pre_build = "scripts/pre-build/autogen.sh"
355 }
356
357 instrumented_library("libasound2") {
358 extra_configure_flags = [ "--disable-static" ]
359 pre_build = "scripts/pre-build/libasound2.sh"
360 }
361
362 instrumented_library("libcairo2") {
363 extra_configure_flags = [
364 "--disable-gtk-doc",
365 "--disable-static",
366 ]
367 }
368
369 instrumented_library("libcap2") {
370 extra_configure_flags = [ "--disable-static" ]
371 build_method = "custom_libcap"
372 }
373
374 instrumented_library("libcredentialkit_pkcs11") {
375 build_method = "stub"
376 }
377
378 instrumented_library("libcups2") {
379 patch = "patches/libcups2.diff"
380 jobs = 1
381 extra_configure_flags = [
382 "--disable-static",
383
384 # All from debian/rules.
385 "--localedir=/usr/share/cups/locale",
386 "--enable-slp",
387 "--enable-libpaper",
388 "--enable-ssl",
389 "--enable-gnutls",
390 "--disable-openssl",
391 "--enable-threads",
392 "--enable-debug",
393 "--enable-dbus",
394 "--with-dbusdir=/etc/dbus-1",
395 "--enable-gssapi",
396 "--enable-avahi",
397 "--with-pdftops=/usr/bin/gs",
398 "--disable-launchd",
399 "--with-cups-group=lp",
400 "--with-system-groups=lpadmin",
401 "--with-printcap=/var/run/cups/printcap",
402 "--with-log-file-perm=0640",
403 "--with-local_protocols=\"CUPS dnssd\"",
404 "--with-remote_protocols=\"CUPS dnssd\"",
405 "--enable-libusb",
406 ]
407 pre_build = "scripts/pre-build/libcups2.sh"
408 }
409
410 instrumented_library("libdbus-1-3") {
411 extra_configure_flags = [
412 "--disable-static",
413
414 # From debian/rules.
415 "--disable-libaudit",
416 "--enable-apparmor",
417 "--enable-systemd",
418 "--libexecdir=/lib/dbus-1.0",
419 "--with-systemdsystemunitdir=/lib/systemd/system",
420 "--disable-tests",
421 "--exec-prefix=/",
422
423 # From dh_auto_configure.
424 "--prefix=/usr",
425 "--localstatedir=/var",
426 ]
427 }
428
429 instrumented_library("libdbus-glib-1-2") {
430 extra_configure_flags = [
431 # Use system dbus-binding-tool. The just-built one is instrumented but
432 # doesn't have the correct RPATH, and will crash.
433 "--with-dbus-binding-tool=dbus-binding-tool",
434 "--disable-static",
435 ]
436 }
437
438 instrumented_library("libdbusmenu") {
439 extra_configure_flags = [
440 "--disable-static",
441
442 # From debian/rules.
443 "--disable-scrollkeeper",
444 "--with-gtk=2",
445
446 # See above.
447 "--disable-introspection",
448 "--disable-vala",
449 ]
450 pre_build = "scripts/pre-build/autogen.sh"
451 }
452
453 instrumented_library("libdbusmenu-glib4") {
454 extra_configure_flags = [
455 "--disable-static",
456
457 # From debian/rules.
458 "--disable-scrollkeeper",
459 "--enable-gtk-doc",
460
461 # --enable-introspection introduces a build step that attempts to run
462 # a just-built binary and crashes. Vala requires introspection.
463 # TODO(eugenis): find a better fix.
464 "--disable-introspection",
465 "--disable-vala",
466 ]
467 pre_build = "scripts/pre-build/autogen.sh"
468 }
469
470 instrumented_library("libexpat1") {
471 extra_configure_flags = [ "--disable-static" ]
472 }
473
474 instrumented_library("libffi6") {
475 extra_configure_flags = [ "--disable-static" ]
476 }
477
478 instrumented_library("libfontconfig1") {
479 extra_configure_flags = [
480 "--disable-docs",
481 "--sysconfdir=/etc/",
482 "--disable-static",
483
484 # From debian/rules.
485 "--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts",
486 ]
487 patch = "patches/libfontconfig.${instrumented_libraries_platform}.diff"
488 }
489
490 instrumented_library("libgconf-2-4") {
491 extra_configure_flags = [
492 "--disable-static",
493
494 # From debian/rules. (Even though --with-gtk=3.0 doesn't make sense.)
495 "--with-gtk=3.0",
496 "--disable-orbit",
497
498 # See above.
499 "--disable-introspection",
500 ]
501 }
502
503 instrumented_library("libgcrypt11") {
504 package_ldflags = [ "-Wl,-z,muldefs" ]
505 extra_configure_flags = [
506 # From debian/rules.
507 "--enable-noexecstack",
508 "--enable-ld-version-script",
509 "--disable-static",
510
511 # http://crbug.com/344505
512 "--disable-asm",
513 ]
514 }
515
516 instrumented_library("libgdk-pixbuf2.0-0") {
517 extra_configure_flags = [
518 "--disable-static",
519
520 # From debian/rules.
521 "--with-libjasper",
522 "--with-x11",
523
524 # Make the build less problematic.
525 "--disable-introspection",
526
527 # Do not use loadable modules. Same as with Pango, there's no easy way
528 # to make gdk-pixbuf pick instrumented versions over system-installed
529 # ones.
530 "--disable-modules",
531 ]
532 pre_build = "scripts/pre-build/libgdk-pixbuf2.0-0.sh"
533 }
534
535 instrumented_library("libglib2.0-0") {
536 extra_configure_flags = [
537 "--disable-gtk-doc",
538 "--disable-gtk-doc-html",
539 "--disable-gtk-doc-pdf",
540 "--disable-static",
541 ]
542 asan_blacklist = "blacklists/asan/libglib2.0-0.txt"
543 msan_blacklist = "blacklists/msan/libglib2.0-0.txt"
544 pre_build = "scripts/pre-build/autogen.sh"
545 }
546
547 instrumented_library("libgnome-keyring0") {
548 extra_configure_flags = [
549 "--disable-static",
550 "--enable-tests=no",
551
552 # Make the build less problematic.
553 "--disable-introspection",
554 ]
555 package_ldflags = [ "-Wl,--as-needed" ]
556 }
557
558 instrumented_library("libgpg-error0") {
559 extra_configure_flags = [ "--disable-static" ]
560 }
561
562 instrumented_library("libgtk2.0-0") {
563 package_cflags = [ "-Wno-return-type" ]
564 extra_configure_flags = [
565 "--disable-static",
566
567 # From debian/rules.
568 "--prefix=/usr",
569 "--sysconfdir=/etc",
570 "--enable-test-print-backend",
571 "--enable-introspection=no",
572 "--with-xinput=yes",
573 ]
574 patch = "patches/libgtk2.0-0.${instrumented_libraries_platform}.diff"
575 pre_build = "scripts/pre-build/libgtk2.0-0.sh"
576 }
577
578 instrumented_library("libnspr4") {
579 extra_configure_flags = [
580 "--enable-64bit",
581 "--disable-static",
582
583 # TSan reports data races on debug variables.
584 "--disable-debug",
585 ]
586 pre_build = "scripts/pre-build/libnspr4.sh"
587 }
588
589 instrumented_library("libp11-kit0") {
590 extra_configure_flags = [ "--disable-static" ]
591
592 # Required on Trusty due to autoconf version mismatch.
593 pre_build = "scripts/pre-build/autoreconf.sh"
594 }
595
596 instrumented_library("libpci3") {
597 extra_configure_flags = [ "--disable-static" ]
598 build_method = "custom_libpci3"
599 jobs = 1
600 }
601
602 instrumented_library("libpcre3") {
603 extra_configure_flags = [
604 "--enable-utf8",
605 "--enable-unicode-properties",
606 "--disable-static",
607 ]
608 }
609
610 instrumented_library("libpixman-1-0") {
611 extra_configure_flags = [
612 "--disable-static",
613
614 # From debian/rules.
615 "--disable-gtk",
616 "--disable-silent-rules",
617
618 # Avoid a clang issue. http://crbug.com/449183
619 "--disable-mmx",
620 ]
621 patch = "patches/libpixman-1-0.diff"
622 }
623
624 instrumented_library("libpng12-0") {
625 extra_configure_flags = [ "--disable-static" ]
626 }
627
628 instrumented_library("libsecret") {
629 extra_configure_flags = [
630 "--disable-static",
631
632 # See above.
633 "--disable-introspection",
634 ]
635 pre_build = "scripts/pre-build/autoreconf.sh"
636 }
637
638 instrumented_library("libtasn1-3") {
639 extra_configure_flags = [
640 "--disable-static",
641
642 # From debian/rules.
643 "--enable-ld-version-script",
644 ]
645 }
646
647 instrumented_library("libtasn1-6") {
648 extra_configure_flags = [
649 "--disable-static",
650
651 # From debian/rules.
652 "--enable-ld-version-script",
653 ]
654 }
655
656 instrumented_library("libunity9") {
657 extra_configure_flags = [ "--disable-static" ]
658 pre_build = "scripts/pre-build/autogen.sh"
659 }
660
661 instrumented_library("libva1") {
662 extra_configure_flags = [ "--disable-static" ]
663
664 # Backport a use-after-free fix:
665 # http://cgit.freedesktop.org/libva/diff/va/va.c?h=staging&id=d4988142a3f225 6e38c5c5cdcdfc1b4f5f3c1ea9
666 patch = "patches/libva1.diff"
667 pre_build = "scripts/pre-build/libva1.sh"
668 }
669
670 instrumented_library("libx11-6") {
671 extra_configure_flags = [
672 "--disable-specs",
673 "--disable-static",
674 ]
675 msan_blacklist = "blacklists/msan/libx11-6.txt"
676
677 # Required on Trusty due to autoconf version mismatch.
678 pre_build = "scripts/pre-build/autoreconf.sh"
679 }
680
681 instrumented_library("libxau6") {
682 extra_configure_flags = [ "--disable-static" ]
683 }
684
685 instrumented_library("libxcb1") {
686 extra_configure_flags = [
687 "--disable-build-docs",
688 "--disable-static",
689 ]
690 pre_build = "scripts/pre-build/autoreconf.sh"
691 if (is_precise) {
692 patch = "patches/libxcb1.precise.diff"
693 }
694 }
695
696 instrumented_library("libxcomposite1") {
697 extra_configure_flags = [ "--disable-static" ]
698 }
699
700 instrumented_library("libxcursor1") {
701 extra_configure_flags = [ "--disable-static" ]
702 }
703
704 instrumented_library("libxdamage1") {
705 extra_configure_flags = [ "--disable-static" ]
706 }
707
708 instrumented_library("libxdmcp6") {
709 extra_configure_flags = [
710 "--disable-docs",
711 "--disable-static",
712 ]
713 }
714
715 instrumented_library("libxext6") {
716 extra_configure_flags = [
717 "--disable-specs",
718 "--disable-static",
719 ]
720 }
721
722 instrumented_library("libxfixes3") {
723 extra_configure_flags = [ "--disable-static" ]
724 }
725
726 instrumented_library("libxi6") {
727 extra_configure_flags = [
728 "--disable-specs",
729 "--disable-docs",
730 "--disable-static",
731 ]
732 }
733
734 instrumented_library("libxinerama1") {
735 extra_configure_flags = [ "--disable-static" ]
736 }
737
738 instrumented_library("libxrandr2") {
739 extra_configure_flags = [ "--disable-static" ]
740 }
741
742 instrumented_library("libxrender1") {
743 extra_configure_flags = [ "--disable-static" ]
744 }
745
746 instrumented_library("libxss1") {
747 extra_configure_flags = [ "--disable-static" ]
748 }
749
750 instrumented_library("libxtst6") {
751 extra_configure_flags = [
752 "--disable-specs",
753 "--disable-static",
754 ]
755 }
756
757 instrumented_library("nss") {
758 # TODO(eugenis): get rid of this dependency
759 deps = [
760 ":libnspr4",
761 ]
762 patch = "patches/nss.diff"
763 build_method = "custom_nss"
764 }
765
766 instrumented_library("pango1.0") {
767 extra_configure_flags = [
768 "--disable-static",
769
770 # Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620
771 "--enable-introspection=no",
772
773 # Pango is normally used with dynamically loaded modules. However,
774 # ensuring pango is able to find instrumented versions of those modules
775 # is a huge pain in the neck. Let's link them statically instead, and
776 # hope for the best.
777 "--with-included-modules=yes",
778 ]
779 }
780
781 instrumented_library("pulseaudio") {
782 # New location of libpulsecommon.
783 if (is_precise) {
784 patch = "patches/pulseaudio.precise.diff"
785 jobs = 1
786 }
787 if (is_trusty) {
788 package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ]
789 }
790 extra_configure_flags = [
791 "--disable-static",
792
793 # From debian/rules.
794 "--enable-x11",
795 "--disable-hal-compat",
796
797 # Disable some ARM-related code that fails compilation. No idea why
798 # this even impacts x86-64 builds.
799 "--disable-neon-opt",
800 ]
801 pre_build = "scripts/pre-build/pulseaudio.sh"
802 }
803
804 instrumented_library("udev") {
805 extra_configure_flags = [
806 "--disable-static",
807
808 # Without this flag there's a linking step that doesn't honor LDFLAGS
809 # and fails.
810 # TODO(eugenis): find a better fix.
811 "--disable-gudev",
812 ]
813 pre_build = "scripts/pre-build/udev.sh"
814 }
815
816 instrumented_library("zlib1g") {
817 # --disable-static is not supported
818 patch = "patches/zlib1g.diff"
819 }
820 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | third_party/instrumented_libraries/scripts/build_and_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698