OLD | NEW |
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("freetype") { |
| 288 pre_build = "scripts/pre-build/freetype.sh" |
| 289 extra_configure_flags = [ "--disable-static" ] |
| 290 } |
| 291 instrumented_library("libcairo2") { |
| 292 extra_configure_flags = [ |
| 293 "--disable-gtk-doc", |
| 294 "--disable-static", |
| 295 ] |
| 296 } |
| 297 instrumented_library("libdbus-1-3") { |
| 298 extra_configure_flags = [ |
| 299 "--disable-static", |
| 300 |
| 301 # From debian/rules. |
| 302 "--disable-libaudit", |
| 303 "--enable-apparmor", |
| 304 "--enable-systemd", |
| 305 "--libexecdir=/lib/dbus-1.0", |
| 306 "--with-systemdsystemunitdir=/lib/systemd/system", |
| 307 "--disable-tests", |
| 308 "--exec-prefix=/", |
| 309 |
| 310 # From dh_auto_configure. |
| 311 "--prefix=/usr", |
| 312 "--localstatedir=/var", |
| 313 ] |
| 314 } |
| 315 instrumented_library("libdbus-glib-1-2") { |
| 316 extra_configure_flags = [ |
| 317 # Use system dbus-binding-tool. The just-built one is instrumented but |
| 318 # doesn't have the correct RPATH, and will crash. |
| 319 "--with-dbus-binding-tool=dbus-binding-tool", |
| 320 "--disable-static", |
| 321 ] |
| 322 } |
| 323 instrumented_library("libexpat1") { |
| 324 extra_configure_flags = [ "--disable-static" ] |
| 325 } |
| 326 instrumented_library("libffi6") { |
| 327 extra_configure_flags = [ "--disable-static" ] |
| 328 } |
| 329 instrumented_library("libfontconfig1") { |
| 330 extra_configure_flags = [ |
| 331 "--disable-docs", |
| 332 "--sysconfdir=/etc/", |
| 333 "--disable-static", |
| 334 |
| 335 # From debian/rules. |
| 336 "--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts", |
| 337 ] |
| 338 patch = "patches/libfontconfig.${instrumented_libraries_platform}.diff" |
| 339 } |
| 340 instrumented_library("libgcrypt11") { |
| 341 package_ldflags = [ "-Wl,-z,muldefs" ] |
| 342 extra_configure_flags = [ |
| 343 # From debian/rules. |
| 344 "--enable-noexecstack", |
| 345 "--enable-ld-version-script", |
| 346 "--disable-static", |
| 347 |
| 348 # http://crbug.com/344505 |
| 349 "--disable-asm", |
| 350 ] |
| 351 } |
| 352 instrumented_library("libglib2.0-0") { |
| 353 extra_configure_flags = [ |
| 354 "--disable-gtk-doc", |
| 355 "--disable-gtk-doc-html", |
| 356 "--disable-gtk-doc-pdf", |
| 357 "--disable-static", |
| 358 ] |
| 359 asan_blacklist = "blacklists/asan/libglib2.0-0.txt" |
| 360 msan_blacklist = "blacklists/msan/libglib2.0-0.txt" |
| 361 pre_build = "scripts/pre-build/autogen.sh" |
| 362 } |
| 363 instrumented_library("libgpg-error0") { |
| 364 extra_configure_flags = [ "--disable-static" ] |
| 365 } |
| 366 instrumented_library("libnspr4") { |
| 367 extra_configure_flags = [ |
| 368 "--enable-64bit", |
| 369 "--disable-static", |
| 370 |
| 371 # TSan reports data races on debug variables. |
| 372 "--disable-debug", |
| 373 ] |
| 374 pre_build = "scripts/pre-build/libnspr4.sh" |
| 375 } |
| 376 instrumented_library("libp11-kit0") { |
| 377 extra_configure_flags = [ "--disable-static" ] |
| 378 |
| 379 # Required on Trusty due to autoconf version mismatch. |
| 380 pre_build = "scripts/pre-build/autoreconf.sh" |
| 381 } |
| 382 instrumented_library("libpcre3") { |
| 383 extra_configure_flags = [ |
| 384 "--enable-utf8", |
| 385 "--enable-unicode-properties", |
| 386 "--disable-static", |
| 387 ] |
| 388 } |
| 389 instrumented_library("libpixman-1-0") { |
| 390 extra_configure_flags = [ |
| 391 "--disable-static", |
| 392 |
| 393 # From debian/rules. |
| 394 "--disable-gtk", |
| 395 "--disable-silent-rules", |
| 396 |
| 397 # Avoid a clang issue. http://crbug.com/449183 |
| 398 "--disable-mmx", |
| 399 ] |
| 400 patch = "patches/libpixman-1-0.diff" |
| 401 } |
| 402 instrumented_library("libpng12-0") { |
| 403 extra_configure_flags = [ "--disable-static" ] |
| 404 } |
| 405 instrumented_library("libx11-6") { |
| 406 extra_configure_flags = [ |
| 407 "--disable-specs", |
| 408 "--disable-static", |
| 409 ] |
| 410 msan_blacklist = "blacklists/msan/libx11-6.txt" |
| 411 |
| 412 # Required on Trusty due to autoconf version mismatch. |
| 413 pre_build = "scripts/pre-build/autoreconf.sh" |
| 414 } |
| 415 instrumented_library("libxau6") { |
| 416 extra_configure_flags = [ "--disable-static" ] |
| 417 } |
| 418 instrumented_library("libxcb1") { |
| 419 extra_configure_flags = [ |
| 420 "--disable-build-docs", |
| 421 "--disable-static", |
| 422 ] |
| 423 pre_build = "scripts/pre-build/autoreconf.sh" |
| 424 if (is_precise) { |
| 425 patch = "patches/libxcb1.precise.diff" |
| 426 } |
| 427 } |
| 428 instrumented_library("libxcomposite1") { |
| 429 extra_configure_flags = [ "--disable-static" ] |
| 430 } |
| 431 instrumented_library("libxcursor1") { |
| 432 extra_configure_flags = [ "--disable-static" ] |
| 433 } |
| 434 instrumented_library("libxdamage1") { |
| 435 extra_configure_flags = [ "--disable-static" ] |
| 436 } |
| 437 instrumented_library("libxdmcp6") { |
| 438 extra_configure_flags = [ |
| 439 "--disable-docs", |
| 440 "--disable-static", |
| 441 ] |
| 442 } |
| 443 instrumented_library("libxext6") { |
| 444 extra_configure_flags = [ |
| 445 "--disable-specs", |
| 446 "--disable-static", |
| 447 ] |
| 448 } |
| 449 instrumented_library("libxfixes3") { |
| 450 extra_configure_flags = [ "--disable-static" ] |
| 451 } |
| 452 instrumented_library("libxi6") { |
| 453 extra_configure_flags = [ |
| 454 "--disable-specs", |
| 455 "--disable-docs", |
| 456 "--disable-static", |
| 457 ] |
| 458 } |
| 459 instrumented_library("libxinerama1") { |
| 460 extra_configure_flags = [ "--disable-static" ] |
| 461 } |
| 462 instrumented_library("libxrandr2") { |
| 463 extra_configure_flags = [ "--disable-static" ] |
| 464 } |
| 465 instrumented_library("libxrender1") { |
| 466 extra_configure_flags = [ "--disable-static" ] |
| 467 } |
| 468 instrumented_library("libxss1") { |
| 469 extra_configure_flags = [ "--disable-static" ] |
| 470 } |
| 471 instrumented_library("libxtst6") { |
| 472 extra_configure_flags = [ |
| 473 "--disable-specs", |
| 474 "--disable-static", |
| 475 ] |
| 476 } |
| 477 instrumented_library("zlib1g") { |
| 478 # --disable-static is not supported |
| 479 patch = "patches/zlib1g.diff" |
| 480 } |
| 481 instrumented_library("nss") { |
| 482 # TODO(eugenis): get rid of this dependency |
| 483 deps = [ |
| 484 ":libnspr4", |
| 485 ] |
| 486 patch = "patches/nss.diff" |
| 487 build_method = "custom_nss" |
| 488 } |
| 489 instrumented_library("pulseaudio") { |
| 490 # New location of libpulsecommon. |
| 491 if (is_precise) { |
| 492 patch = "patches/pulseaudio.precise.diff" |
| 493 jobs = 1 |
| 494 } |
| 495 if (is_trusty) { |
| 496 package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ] |
| 497 } |
| 498 extra_configure_flags = [ |
| 499 "--disable-static", |
| 500 |
| 501 # From debian/rules. |
| 502 "--enable-x11", |
| 503 "--disable-hal-compat", |
| 504 |
| 505 # Disable some ARM-related code that fails compilation. No idea why |
| 506 # this even impacts x86-64 builds. |
| 507 "--disable-neon-opt", |
| 508 ] |
| 509 pre_build = "scripts/pre-build/pulseaudio.sh" |
| 510 } |
| 511 instrumented_library("libasound2") { |
| 512 extra_configure_flags = [ "--disable-static" ] |
| 513 pre_build = "scripts/pre-build/libasound2.sh" |
| 514 } |
| 515 instrumented_library("libcups2") { |
| 516 patch = "patches/libcups2.diff" |
| 517 jobs = 1 |
| 518 extra_configure_flags = [ |
| 519 "--disable-static", |
| 520 |
| 521 # All from debian/rules. |
| 522 "--localedir=/usr/share/cups/locale", |
| 523 "--enable-slp", |
| 524 "--enable-libpaper", |
| 525 "--enable-ssl", |
| 526 "--enable-gnutls", |
| 527 "--disable-openssl", |
| 528 "--enable-threads", |
| 529 "--enable-debug", |
| 530 "--enable-dbus", |
| 531 "--with-dbusdir=/etc/dbus-1", |
| 532 "--enable-gssapi", |
| 533 "--enable-avahi", |
| 534 "--with-pdftops=/usr/bin/gs", |
| 535 "--disable-launchd", |
| 536 "--with-cups-group=lp", |
| 537 "--with-system-groups=lpadmin", |
| 538 "--with-printcap=/var/run/cups/printcap", |
| 539 "--with-log-file-perm=0640", |
| 540 "--with-local_protocols=\"CUPS dnssd\"", |
| 541 "--with-remote_protocols=\"CUPS dnssd\"", |
| 542 "--enable-libusb", |
| 543 ] |
| 544 pre_build = "scripts/pre-build/libcups2.sh" |
| 545 } |
| 546 instrumented_library("pango1.0") { |
| 547 extra_configure_flags = [ |
| 548 "--disable-static", |
| 549 |
| 550 # Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620 |
| 551 "--enable-introspection=no", |
| 552 |
| 553 # Pango is normally used with dynamically loaded modules. However, |
| 554 # ensuring pango is able to find instrumented versions of those modules |
| 555 # is a huge pain in the neck. Let's link them statically instead, and |
| 556 # hope for the best. |
| 557 "--with-included-modules=yes", |
| 558 ] |
| 559 } |
| 560 instrumented_library("libcap2") { |
| 561 extra_configure_flags = [ "--disable-static" ] |
| 562 build_method = "custom_libcap" |
| 563 } |
| 564 instrumented_library("udev") { |
| 565 extra_configure_flags = [ |
| 566 "--disable-static", |
| 567 |
| 568 # Without this flag there's a linking step that doesn't honor LDFLAGS |
| 569 # and fails. |
| 570 # TODO(eugenis): find a better fix. |
| 571 "--disable-gudev", |
| 572 ] |
| 573 pre_build = "scripts/pre-build/udev.sh" |
| 574 } |
| 575 instrumented_library("libtasn1-3") { |
| 576 extra_configure_flags = [ |
| 577 "--disable-static", |
| 578 |
| 579 # From debian/rules. |
| 580 "--enable-ld-version-script", |
| 581 ] |
| 582 } |
| 583 instrumented_library("libtasn1-6") { |
| 584 extra_configure_flags = [ |
| 585 "--disable-static", |
| 586 |
| 587 # From debian/rules. |
| 588 "--enable-ld-version-script", |
| 589 ] |
| 590 } |
| 591 instrumented_library("libgnome-keyring0") { |
| 592 extra_configure_flags = [ |
| 593 "--disable-static", |
| 594 "--enable-tests=no", |
| 595 |
| 596 # Make the build less problematic. |
| 597 "--disable-introspection", |
| 598 ] |
| 599 package_ldflags = [ "-Wl,--as-needed" ] |
| 600 } |
| 601 instrumented_library("libgtk2.0-0") { |
| 602 package_cflags = [ "-Wno-return-type" ] |
| 603 extra_configure_flags = [ |
| 604 "--disable-static", |
| 605 |
| 606 # From debian/rules. |
| 607 "--prefix=/usr", |
| 608 "--sysconfdir=/etc", |
| 609 "--enable-test-print-backend", |
| 610 "--enable-introspection=no", |
| 611 "--with-xinput=yes", |
| 612 ] |
| 613 patch = "patches/libgtk2.0-0.${instrumented_libraries_platform}.diff" |
| 614 pre_build = "scripts/pre-build/libgtk2.0-0.sh" |
| 615 } |
| 616 instrumented_library("libgdk-pixbuf2.0-0") { |
| 617 extra_configure_flags = [ |
| 618 "--disable-static", |
| 619 |
| 620 # From debian/rules. |
| 621 "--with-libjasper", |
| 622 "--with-x11", |
| 623 |
| 624 # Make the build less problematic. |
| 625 "--disable-introspection", |
| 626 |
| 627 # Do not use loadable modules. Same as with Pango, there's no easy way |
| 628 # to make gdk-pixbuf pick instrumented versions over system-installed |
| 629 # ones. |
| 630 "--disable-modules", |
| 631 ] |
| 632 pre_build = "scripts/pre-build/libgdk-pixbuf2.0-0.sh" |
| 633 } |
| 634 instrumented_library("libpci3") { |
| 635 extra_configure_flags = [ "--disable-static" ] |
| 636 build_method = "custom_libpci3" |
| 637 jobs = 1 |
| 638 } |
| 639 instrumented_library("libdbusmenu-glib4") { |
| 640 extra_configure_flags = [ |
| 641 "--disable-static", |
| 642 |
| 643 # From debian/rules. |
| 644 "--disable-scrollkeeper", |
| 645 "--enable-gtk-doc", |
| 646 |
| 647 # --enable-introspection introduces a build step that attempts to run |
| 648 # a just-built binary and crashes. Vala requires introspection. |
| 649 # TODO(eugenis): find a better fix. |
| 650 "--disable-introspection", |
| 651 "--disable-vala", |
| 652 ] |
| 653 pre_build = "scripts/pre-build/autogen.sh" |
| 654 } |
| 655 instrumented_library("libgconf-2-4") { |
| 656 extra_configure_flags = [ |
| 657 "--disable-static", |
| 658 |
| 659 # From debian/rules. (Even though --with-gtk=3.0 doesn't make sense.) |
| 660 "--with-gtk=3.0", |
| 661 "--disable-orbit", |
| 662 |
| 663 # See above. |
| 664 "--disable-introspection", |
| 665 ] |
| 666 } |
| 667 instrumented_library("libappindicator1") { |
| 668 extra_configure_flags = [ |
| 669 "--disable-static", |
| 670 |
| 671 # See above. |
| 672 "--disable-introspection", |
| 673 ] |
| 674 jobs = 1 |
| 675 pre_build = "scripts/pre-build/autogen.sh" |
| 676 } |
| 677 instrumented_library("libdbusmenu") { |
| 678 extra_configure_flags = [ |
| 679 "--disable-static", |
| 680 |
| 681 # From debian/rules. |
| 682 "--disable-scrollkeeper", |
| 683 "--with-gtk=2", |
| 684 |
| 685 # See above. |
| 686 "--disable-introspection", |
| 687 "--disable-vala", |
| 688 ] |
| 689 pre_build = "scripts/pre-build/autogen.sh" |
| 690 } |
| 691 instrumented_library("atk1.0") { |
| 692 extra_configure_flags = [ |
| 693 "--disable-static", |
| 694 |
| 695 # See above. |
| 696 "--disable-introspection", |
| 697 ] |
| 698 } |
| 699 instrumented_library("libunity9") { |
| 700 extra_configure_flags = [ "--disable-static" ] |
| 701 pre_build = "scripts/pre-build/autogen.sh" |
| 702 } |
| 703 instrumented_library("dee") { |
| 704 extra_configure_flags = [ |
| 705 "--disable-static", |
| 706 |
| 707 # See above. |
| 708 "--disable-introspection", |
| 709 ] |
| 710 pre_build = "scripts/pre-build/autogen.sh" |
| 711 } |
| 712 instrumented_library("harfbuzz") { |
| 713 package_cflags = [ "-Wno-c++11-narrowing" ] |
| 714 extra_configure_flags = [ |
| 715 "--disable-static", |
| 716 |
| 717 # From debian/rules. |
| 718 "--with-graphite2=yes", |
| 719 "--with-gobject", |
| 720 |
| 721 # See above. |
| 722 "--disable-introspection", |
| 723 ] |
| 724 } |
| 725 instrumented_library("brltty") { |
| 726 extra_configure_flags = [ |
| 727 "--disable-static", |
| 728 |
| 729 # From debian/rules. |
| 730 "--without-viavoice", |
| 731 "--without-theta", |
| 732 "--without-swift", |
| 733 "--bindir=/sbin", |
| 734 "--with-curses=ncursesw", |
| 735 "--disable-stripping", |
| 736 |
| 737 # We don't need any of those. |
| 738 "--disable-java-bindings", |
| 739 "--disable-lisp-bindings", |
| 740 "--disable-ocaml-bindings", |
| 741 "--disable-python-bindings", |
| 742 "--disable-tcl-bindings", |
| 743 ] |
| 744 } |
| 745 instrumented_library("libva1") { |
| 746 extra_configure_flags = [ "--disable-static" ] |
| 747 |
| 748 # Backport a use-after-free fix: |
| 749 # http://cgit.freedesktop.org/libva/diff/va/va.c?h=staging&id=d4988142a3f225
6e38c5c5cdcdfc1b4f5f3c1ea9 |
| 750 patch = "patches/libva1.diff" |
| 751 pre_build = "scripts/pre-build/libva1.sh" |
| 752 } |
| 753 instrumented_library("libsecret") { |
| 754 extra_configure_flags = [ |
| 755 "--disable-static", |
| 756 |
| 757 # See above. |
| 758 "--disable-introspection", |
| 759 ] |
| 760 pre_build = "scripts/pre-build/autoreconf.sh" |
| 761 } |
| 762 instrumented_library("libcredentialkit_pkcs11") { |
| 763 build_method = "stub" |
| 764 } |
| 765 } |
OLD | NEW |