[Instrumented libraries] Move build files to xenial subdirectory
This is in preparation for adding a separate directory for focal. In addition, the name of the prebuilt binaries changes from msan-no-origins-xenial.tgz to msan-no-origins.tgz. This is so that projects like V8 do not have to manually update their DEPS entries when auto-rolling //third_party/instrumented_libraries. BUG=1260217 R=thestig CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux_chromium_msan_rel_ng Change-Id: Id2eb94405f76e590cbc25b425c80eb08353d871f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3224627 Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#932225}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
65f14467a5
commit
9f5ce757de
DEPS
docs/linux
third_party/instrumented_libraries
4
DEPS
4
DEPS
@@ -4092,7 +4092,7 @@ hooks = [
|
|||||||
'--no_resume',
|
'--no_resume',
|
||||||
'--no_auth',
|
'--no_auth',
|
||||||
'--bucket', 'chromium-instrumented-libraries',
|
'--bucket', 'chromium-instrumented-libraries',
|
||||||
'-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins-xenial.tgz.sha1',
|
'-s', 'src/third_party/instrumented_libraries/binaries/msan-chained-origins.tgz.sha1',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -4104,7 +4104,7 @@ hooks = [
|
|||||||
'--no_resume',
|
'--no_resume',
|
||||||
'--no_auth',
|
'--no_auth',
|
||||||
'--bucket', 'chromium-instrumented-libraries',
|
'--bucket', 'chromium-instrumented-libraries',
|
||||||
'-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins-xenial.tgz.sha1',
|
'-s', 'src/third_party/instrumented_libraries/binaries/msan-no-origins.tgz.sha1',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -99,7 +99,7 @@ Now we're ready to build the libraries. A clean build takes a little over 8
|
|||||||
minutes on a 72-thread machine.
|
minutes on a 72-thread machine.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
third_party/instrumented_libraries/scripts/build_and_package.py --parallel -j $(nproc) all
|
third_party/instrumented_libraries/scripts/build_and_package.py --parallel -j $(nproc) all xenial
|
||||||
```
|
```
|
||||||
|
|
||||||
## Uploading the libraries
|
## Uploading the libraries
|
||||||
@@ -115,8 +115,7 @@ exit
|
|||||||
mv *.tgz third_party/instrumented_libraries/binaries
|
mv *.tgz third_party/instrumented_libraries/binaries
|
||||||
|
|
||||||
# Upload.
|
# Upload.
|
||||||
upload_to_google_storage.py -b chromium-instrumented-libraries third_party/instrumented_libraries/binaries/msan-chained-origins-xenial.tgz
|
upload_to_google_storage.py -b chromium-instrumented-libraries third_party/instrumented_libraries/binaries/msan*.tgz
|
||||||
upload_to_google_storage.py -b chromium-instrumented-libraries third_party/instrumented_libraries/binaries/msan-no-origins-xenial.tgz
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing and uploading a CL
|
## Testing and uploading a CL
|
||||||
|
875
third_party/instrumented_libraries/BUILD.gn
vendored
875
third_party/instrumented_libraries/BUILD.gn
vendored
@@ -2,13 +2,15 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
import("//build/config/python.gni")
|
|
||||||
import("//build/config/sanitizers/sanitizers.gni")
|
import("//build/config/sanitizers/sanitizers.gni")
|
||||||
import("//build/toolchain/goma.gni")
|
|
||||||
|
declare_args() {
|
||||||
|
instrumented_libraries_release = "xenial"
|
||||||
|
}
|
||||||
|
|
||||||
group("deps") {
|
group("deps") {
|
||||||
if (use_locally_built_instrumented_libraries) {
|
if (use_locally_built_instrumented_libraries) {
|
||||||
deps = [ ":locally_built" ]
|
deps = [ "//third_party/instrumented_libraries/$instrumented_libraries_release:locally_built" ]
|
||||||
} else if (use_prebuilt_instrumented_libraries) {
|
} else if (use_prebuilt_instrumented_libraries) {
|
||||||
assert(prebuilt_instrumented_libraries_available,
|
assert(prebuilt_instrumented_libraries_available,
|
||||||
"Prebuilt instrumented libraries are only available when " +
|
"Prebuilt instrumented libraries are only available when " +
|
||||||
@@ -61,861 +63,14 @@ if (prebuilt_instrumented_libraries_available) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_locally_built_instrumented_libraries) {
|
config("locally_built_ldflags") {
|
||||||
group("locally_built") {
|
ldflags = [
|
||||||
visibility = [ ":deps" ]
|
# Add a relative RPATH entry to Chromium binaries. This puts instrumented
|
||||||
deps = [
|
# DSOs before system-installed versions in library search path.
|
||||||
":atk1.0",
|
"-Wl,-R,\$ORIGIN/instrumented_libraries/lib",
|
||||||
":brltty",
|
"-Wl,-z,origin",
|
||||||
":dee",
|
|
||||||
":freetype",
|
# Add some padding to allow RPATHs to be modified later.
|
||||||
":harfbuzz",
|
"-Wl,-R,________________________________________________________________PADDING________________________________________________________________",
|
||||||
":libappindicator3-1",
|
]
|
||||||
":libasound2",
|
|
||||||
":libatk-bridge2.0-0",
|
|
||||||
":libatspi2.0-0",
|
|
||||||
":libavahi-client3",
|
|
||||||
":libcairo2",
|
|
||||||
":libcap2",
|
|
||||||
":libcgmanager0",
|
|
||||||
":libcredentialkit_pkcs11",
|
|
||||||
":libcups2",
|
|
||||||
":libcurl3-gnutls",
|
|
||||||
":libdbus-1-3",
|
|
||||||
":libdbus-glib-1-2",
|
|
||||||
":libdbusmenu",
|
|
||||||
":libdbusmenu-glib4",
|
|
||||||
":libexpat1",
|
|
||||||
":libffi6",
|
|
||||||
":libfontconfig1",
|
|
||||||
":libgcrypt20",
|
|
||||||
":libgdk-pixbuf2.0-0",
|
|
||||||
":libglib2.0-0",
|
|
||||||
":libgnome-keyring0",
|
|
||||||
":libgnutls30",
|
|
||||||
":libgpg-error0",
|
|
||||||
":libgtk-3-0",
|
|
||||||
":libidn11",
|
|
||||||
":libido3-0.1-0",
|
|
||||||
":libindicator3-7",
|
|
||||||
":libjasper1",
|
|
||||||
":libjpeg-turbo8",
|
|
||||||
":libldap-2.4-2",
|
|
||||||
":libnih-dbus1",
|
|
||||||
":libnih1",
|
|
||||||
":libnspr4",
|
|
||||||
":libp11-kit0",
|
|
||||||
":libpci3",
|
|
||||||
":libpcre3",
|
|
||||||
":libpixman-1-0",
|
|
||||||
":libpng12-0",
|
|
||||||
":librtmp1",
|
|
||||||
":libsasl2-2",
|
|
||||||
":libsecret",
|
|
||||||
":libtasn1-6",
|
|
||||||
":libudev1",
|
|
||||||
":libunity9",
|
|
||||||
":libva1",
|
|
||||||
":libwayland-client0",
|
|
||||||
":libx11-6",
|
|
||||||
":libxau6",
|
|
||||||
":libxcb1",
|
|
||||||
":libxcomposite1",
|
|
||||||
":libxcursor1",
|
|
||||||
":libxdamage1",
|
|
||||||
":libxdmcp6",
|
|
||||||
":libxext6",
|
|
||||||
":libxfixes3",
|
|
||||||
":libxi6",
|
|
||||||
":libxinerama1",
|
|
||||||
":libxkbcommon0",
|
|
||||||
":libxrandr2",
|
|
||||||
":libxrender1",
|
|
||||||
":libxss1",
|
|
||||||
":libxtst6",
|
|
||||||
":nss",
|
|
||||||
":pango1.0",
|
|
||||||
":pulseaudio",
|
|
||||||
":zlib1g",
|
|
||||||
]
|
|
||||||
data = [ "${root_out_dir}/instrumented_libraries/lib" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("locally_built_ldflags") {
|
|
||||||
ldflags = [
|
|
||||||
# Add a relative RPATH entry to Chromium binaries. This puts instrumented
|
|
||||||
# DSOs before system-installed versions in library search path.
|
|
||||||
"-Wl,-R,\$ORIGIN/instrumented_libraries/lib",
|
|
||||||
"-Wl,-z,origin",
|
|
||||||
|
|
||||||
# Add some padding to allow RPATHs to be modified later.
|
|
||||||
"-Wl,-R,________________________________________________________________PADDING________________________________________________________________",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
template("instrumented_library") {
|
|
||||||
action(target_name) {
|
|
||||||
script = "scripts/download_build_install.py"
|
|
||||||
build_method = "destdir"
|
|
||||||
if (defined(invoker.build_method)) {
|
|
||||||
build_method = invoker.build_method
|
|
||||||
}
|
|
||||||
|
|
||||||
cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang")
|
|
||||||
cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++")
|
|
||||||
if (use_goma) {
|
|
||||||
cc = "${goma_dir}/gomacc ${cc}"
|
|
||||||
cxx = "${goma_dir}/gomacc ${cxx}"
|
|
||||||
}
|
|
||||||
package_cflags = [
|
|
||||||
"-O2",
|
|
||||||
"-gline-tables-only",
|
|
||||||
"-fPIC",
|
|
||||||
"-w",
|
|
||||||
"-U_FORTIFY_SOURCE",
|
|
||||||
"-fno-omit-frame-pointer",
|
|
||||||
|
|
||||||
"-fsanitize=memory",
|
|
||||||
"-fsanitize-memory-track-origins=${msan_track_origins}",
|
|
||||||
]
|
|
||||||
package_ldflags = [ "-fsanitize=memory" ]
|
|
||||||
if (defined(invoker.package_cflags)) {
|
|
||||||
package_cflags += invoker.package_cflags
|
|
||||||
}
|
|
||||||
if (defined(invoker.package_ldflags)) {
|
|
||||||
package_ldflags += invoker.package_ldflags
|
|
||||||
}
|
|
||||||
if (defined(invoker.deps)) {
|
|
||||||
deps = invoker.deps
|
|
||||||
}
|
|
||||||
product_dir = rebase_path(root_out_dir)
|
|
||||||
intermediate_dir = rebase_path(target_gen_dir)
|
|
||||||
args = [
|
|
||||||
"--build-method=${build_method}",
|
|
||||||
"--cc=${cc}",
|
|
||||||
"--cxx=${cxx}",
|
|
||||||
"--intermediate-dir=${intermediate_dir}",
|
|
||||||
"--libdir=lib",
|
|
||||||
"--package=${target_name}",
|
|
||||||
"--product-dir=${product_dir}",
|
|
||||||
"--cflags=${package_cflags}",
|
|
||||||
"--ldflags=${package_ldflags}",
|
|
||||||
]
|
|
||||||
outputs = [ "${root_out_dir}/instrumented_libraries/${target_name}.txt" ]
|
|
||||||
inputs = []
|
|
||||||
if (defined(invoker.pre_build)) {
|
|
||||||
inputs += [ invoker.pre_build ]
|
|
||||||
args += [ "--pre-build=${invoker.pre_build}" ]
|
|
||||||
}
|
|
||||||
if (defined(invoker.patches)) {
|
|
||||||
inputs += invoker.patches
|
|
||||||
foreach(patch, invoker.patches) {
|
|
||||||
args += [ "--patch=${patch}" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (defined(invoker.msan_blacklist)) {
|
|
||||||
inputs += [ invoker.msan_blacklist ]
|
|
||||||
args += [ "--sanitizer-blacklist=${invoker.msan_blacklist}" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined(invoker.extra_configure_flags)) {
|
|
||||||
args += [ "--extra-configure-flags=${invoker.extra_configure_flags}" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("atk1.0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("brltty") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--without-viavoice",
|
|
||||||
"--without-theta",
|
|
||||||
"--without-swift",
|
|
||||||
"--bindir=/sbin",
|
|
||||||
"--with-curses=ncursesw",
|
|
||||||
"--disable-stripping",
|
|
||||||
|
|
||||||
# We don't need any of those.
|
|
||||||
"--disable-java-bindings",
|
|
||||||
"--disable-lisp-bindings",
|
|
||||||
"--disable-ocaml-bindings",
|
|
||||||
"--disable-python-bindings",
|
|
||||||
"--disable-tcl-bindings",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("dee") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("freetype") {
|
|
||||||
pre_build = "scripts/pre-build/freetype.sh"
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("harfbuzz") {
|
|
||||||
package_cflags = [ "-Wno-c++11-narrowing" ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--with-graphite2=yes",
|
|
||||||
"--with-gobject",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libappindicator3-1") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
|
|
||||||
"--with-gtk=3",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libasound2") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
pre_build = "scripts/pre-build/libasound2.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libatk-bridge2.0-0") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libatspi2.0-0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libavahi-client3") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--disable-introspection",
|
|
||||||
"--disable-gtk3",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-compat-libdns_sd",
|
|
||||||
"--disable-mono",
|
|
||||||
"--disable-monodoc",
|
|
||||||
"--disable-qt3",
|
|
||||||
"--with-systemdsystemunitdir=/lib/systemd/system",
|
|
||||||
]
|
|
||||||
patches = [ "patches/libavahi-client3.diff" ]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcairo2") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-gtk-doc",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Required due to aclocal version mismatch.
|
|
||||||
pre_build = "scripts/pre-build/autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcap2") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
build_method = "custom_libcap"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcgmanager0") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
|
|
||||||
# Required due to autoconf version mismatch.
|
|
||||||
pre_build = "scripts/pre-build/autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcredentialkit_pkcs11") {
|
|
||||||
build_method = "stub"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcups2") {
|
|
||||||
patches = [ "patches/libcups2.diff" ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# All from debian/rules.
|
|
||||||
"--localedir=/usr/share/cups/locale",
|
|
||||||
"--enable-slp",
|
|
||||||
"--enable-libpaper",
|
|
||||||
"--enable-ssl",
|
|
||||||
"--enable-gnutls",
|
|
||||||
"--disable-openssl",
|
|
||||||
"--enable-threads",
|
|
||||||
"--enable-debug",
|
|
||||||
"--enable-dbus",
|
|
||||||
"--with-dbusdir=/etc/dbus-1",
|
|
||||||
"--enable-gssapi",
|
|
||||||
"--enable-avahi",
|
|
||||||
"--with-pdftops=/usr/bin/gs",
|
|
||||||
"--disable-launchd",
|
|
||||||
"--with-cups-group=lp",
|
|
||||||
"--with-system-groups=lpadmin",
|
|
||||||
"--with-printcap=/var/run/cups/printcap",
|
|
||||||
"--with-log-file-perm=0640",
|
|
||||||
"--with-local_protocols=\"CUPS dnssd\"",
|
|
||||||
"--with-remote_protocols=\"CUPS dnssd\"",
|
|
||||||
"--enable-libusb",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/libcups2.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libcurl3-gnutls") {
|
|
||||||
build_method = "custom_libcurl"
|
|
||||||
|
|
||||||
# Don't generate zsh completions.
|
|
||||||
patches = [ "patches/libcurl3-gnutls.diff" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libdbus-1-3") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--disable-libaudit",
|
|
||||||
"--enable-apparmor",
|
|
||||||
"--enable-systemd",
|
|
||||||
"--libexecdir=/lib/dbus-1.0",
|
|
||||||
"--with-systemdsystemunitdir=/lib/systemd/system",
|
|
||||||
"--disable-tests",
|
|
||||||
"--exec-prefix=/",
|
|
||||||
|
|
||||||
# From dh_auto_configure.
|
|
||||||
"--prefix=/usr",
|
|
||||||
"--localstatedir=/var",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libdbus-glib-1-2") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
# Use system dbus-binding-tool. The just-built one is instrumented but
|
|
||||||
# doesn't have the correct RPATH, and will crash.
|
|
||||||
"--with-dbus-binding-tool=dbus-binding-tool",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libdbusmenu") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--disable-scrollkeeper",
|
|
||||||
"--with-gtk=2",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
"--disable-vala",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libdbusmenu-glib4") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--disable-scrollkeeper",
|
|
||||||
"--enable-gtk-doc",
|
|
||||||
|
|
||||||
# --enable-introspection introduces a build step that attempts to run
|
|
||||||
# a just-built binary and crashes. Vala requires introspection.
|
|
||||||
# TODO(eugenis): find a better fix.
|
|
||||||
"--disable-introspection",
|
|
||||||
"--disable-vala",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libexpat1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libffi6") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libfontconfig1") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-docs",
|
|
||||||
"--sysconfdir=/etc/",
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgcrypt20") {
|
|
||||||
package_ldflags = [ "-Wl,-z,muldefs" ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-noexecstack",
|
|
||||||
"--enable-ld-version-script",
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# http://crbug.com/344505
|
|
||||||
"--disable-asm",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgdk-pixbuf2.0-0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--without-libjasper",
|
|
||||||
"--disable-introspection",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--with-x11",
|
|
||||||
|
|
||||||
# Do not use loadable modules. Same as with Pango, there's no easy way
|
|
||||||
# to make gdk-pixbuf pick instrumented versions over system-installed
|
|
||||||
# ones.
|
|
||||||
"--disable-modules",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/libgdk-pixbuf2.0-0.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libglib2.0-0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-gtk-doc",
|
|
||||||
"--disable-gtk-doc-html",
|
|
||||||
"--disable-gtk-doc-pdf",
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# --with-pcre=system (the default) fails because the system-supplied
|
|
||||||
# PCRE does not support Unicode properties or UTF-8.
|
|
||||||
"--with-pcre=internal",
|
|
||||||
]
|
|
||||||
msan_blacklist = "blacklists/msan/libglib2.0-0.txt"
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgnome-keyring0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--enable-tests=no",
|
|
||||||
|
|
||||||
# Make the build less problematic.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
package_ldflags = [ "-Wl,--as-needed" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgnutls30") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
# from debian/rules.
|
|
||||||
"--enable-ld-version-script",
|
|
||||||
"--enable-cxx",
|
|
||||||
"--without-lzo",
|
|
||||||
"--disable-guile",
|
|
||||||
"--with-libgcrypt",
|
|
||||||
"--with-packager=Debian",
|
|
||||||
|
|
||||||
# MSAN is not compatible with instructions such as CPUID.
|
|
||||||
# https://github.com/google/oss-fuzz/issues/578
|
|
||||||
"--disable-hardware-acceleration",
|
|
||||||
]
|
|
||||||
patches = [
|
|
||||||
# Make sure to use the memset/memcmp provided by MSAN, not the
|
|
||||||
# gnutls-provided ones.
|
|
||||||
"patches/libgnutls30.1.diff",
|
|
||||||
|
|
||||||
# Work around several usages of uninitialized memory. The allocated
|
|
||||||
# memory is contained within libgnutls, so will not affect Chromium test
|
|
||||||
# coverage.
|
|
||||||
"patches/libgnutls30.2.diff",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgpg-error0") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libgtk-3-0") {
|
|
||||||
package_cflags = [ "-Wno-return-type" ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--disable-introspection",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-test-print-backend",
|
|
||||||
"--enable-x11-backend",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/libgtk-3-0.sh"
|
|
||||||
patches = [
|
|
||||||
# MSAN does not support GL, so it must be disabled in GTK.
|
|
||||||
# https://www.chromium.org/developers/testing/memorysanitizer#TOC-Disable-OpenGL
|
|
||||||
"patches/libgtk-3-0.diff",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libido3-0.1-0") {
|
|
||||||
package_cflags = [ "-Wno-return-type" ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
|
|
||||||
"--with-gtk=3",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libidn11") {
|
|
||||||
package_ldflags = [ "-Wl,-z,undefs" ]
|
|
||||||
build_method = "debian"
|
|
||||||
pre_build = "scripts/pre-build/libidn.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libindicator3-7") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libjasper1") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-shared=yes",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libjpeg-turbo8") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--with-jpeg8",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libldap-2.4-2") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-slapd",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-debug",
|
|
||||||
"--enable-dynamic",
|
|
||||||
"--enable-syslog",
|
|
||||||
"--enable-proctitle",
|
|
||||||
"--enable-ipv6",
|
|
||||||
"--enable-local",
|
|
||||||
"--with-subdir=ldap",
|
|
||||||
"--with-cyrus-sasl",
|
|
||||||
"--with-threads",
|
|
||||||
"--with-gssapi",
|
|
||||||
"--with-tls=gnutls",
|
|
||||||
"--with-odbc=unixodbc",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Debian adds a custom patch that adds @VERSION_OPTION@, which must
|
|
||||||
# be substituted before building.
|
|
||||||
pre_build = "scripts/pre-build/dh_autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libnih1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
|
|
||||||
pre_build = "scripts/pre-build/libnih1.sh"
|
|
||||||
|
|
||||||
patches = [ "patches/libnih1.diff" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libnih-dbus1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
|
|
||||||
pre_build = "scripts/pre-build/libnih1.sh"
|
|
||||||
|
|
||||||
patches = [ "patches/libnih1.diff" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libnspr4") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--enable-64bit",
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# TSan reports data races on debug variables.
|
|
||||||
"--disable-debug",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/libnspr4.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libp11-kit0") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
|
|
||||||
# Required due to autoconf version mismatch.
|
|
||||||
pre_build = "scripts/pre-build/autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libpci3") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
build_method = "custom_libpci3"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libpcre3") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--enable-utf8",
|
|
||||||
"--enable-unicode-properties",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/dh_autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libpixman-1-0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--disable-gtk",
|
|
||||||
"--disable-silent-rules",
|
|
||||||
|
|
||||||
# Avoid a clang issue. http://crbug.com/449183
|
|
||||||
"--disable-mmx",
|
|
||||||
]
|
|
||||||
patches = [
|
|
||||||
"patches/libpixman-1-0.1.diff",
|
|
||||||
|
|
||||||
# Fix an incompatibility when building with clang.
|
|
||||||
"patches/libpixman-1-0.2.diff",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libpng12-0") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("librtmp1") {
|
|
||||||
build_method = "debian"
|
|
||||||
|
|
||||||
# Ensure we build with clang.
|
|
||||||
patches = [ "patches/librtmp1.diff" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libsasl2-2") {
|
|
||||||
build_method = "debian"
|
|
||||||
pre_build = "scripts/pre-build/libsasl2-2.sh"
|
|
||||||
package_cflags = [ "-Wno-return-type" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libsecret") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# See above.
|
|
||||||
"--disable-introspection",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libtasn1-3") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-ld-version-script",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libtasn1-6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-ld-version-script",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libunity9") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
pre_build = "scripts/pre-build/autogen.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libva1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
pre_build = "scripts/pre-build/libva1.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libwayland-client0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
"--disable-documentation",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Do not use the just-built wayland_scanner because it is not runnable due
|
|
||||||
# to uninstrumented dependencies.
|
|
||||||
extra_configure_flags += [ "--with-host-scanner" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libx11-6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-specs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
msan_blacklist = "blacklists/msan/libx11-6.txt"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxau6") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxcb1") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-build-docs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/autoreconf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxcomposite1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxcursor1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxdamage1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxdmcp6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-docs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxext6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-specs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxfixes3") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxi6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-specs",
|
|
||||||
"--disable-docs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxinerama1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxkbcommon0") {
|
|
||||||
package_ldflags = [ "-Wl,-z,undefs" ]
|
|
||||||
build_method = "debian"
|
|
||||||
pre_build = "scripts/pre-build/xkbcommon.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxrandr2") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxrender1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxss1") {
|
|
||||||
extra_configure_flags = [ "--disable-static" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libxtst6") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-specs",
|
|
||||||
"--disable-static",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("nss") {
|
|
||||||
# TODO(eugenis): get rid of this dependency
|
|
||||||
deps = [ ":libnspr4" ]
|
|
||||||
patches = [ "patches/nss.diff" ]
|
|
||||||
build_method = "custom_nss"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("pango1.0") {
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620
|
|
||||||
"--enable-introspection=no",
|
|
||||||
|
|
||||||
# Pango is normally used with dynamically loaded modules. However,
|
|
||||||
# ensuring pango is able to find instrumented versions of those modules
|
|
||||||
# is a huge pain in the neck. Let's link them statically instead, and
|
|
||||||
# hope for the best.
|
|
||||||
"--with-included-modules=yes",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("pulseaudio") {
|
|
||||||
# New location of libpulsecommon.
|
|
||||||
package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ]
|
|
||||||
extra_configure_flags = [
|
|
||||||
"--disable-static",
|
|
||||||
|
|
||||||
# From debian/rules.
|
|
||||||
"--enable-x11",
|
|
||||||
"--disable-hal-compat",
|
|
||||||
|
|
||||||
# Disable some ARM-related code that fails compilation. No idea why
|
|
||||||
# this even impacts x86-64 builds.
|
|
||||||
"--disable-neon-opt",
|
|
||||||
|
|
||||||
# There's a build failure caused (I think) by a missing include, so skip
|
|
||||||
# building the offending file to avoid maintaining a patch.
|
|
||||||
"--disable-android-hal",
|
|
||||||
]
|
|
||||||
pre_build = "scripts/pre-build/pulseaudio.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("libudev1") {
|
|
||||||
build_method = "debian"
|
|
||||||
pre_build = "scripts/pre-build/udev.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
instrumented_library("zlib1g") {
|
|
||||||
# --disable-static is not supported
|
|
||||||
patches = [ "patches/zlib1g.diff" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -23,14 +23,12 @@ BUILD_TYPES = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
SUPPORTED_RELEASE = 'xenial'
|
|
||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class UnsupportedReleaseError(Error):
|
class IncorrectReleaseError(Error):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -45,8 +43,7 @@ def _tar_filter(tar_info):
|
|||||||
|
|
||||||
|
|
||||||
def build_libraries(build_type, ubuntu_release, jobs, use_goma):
|
def build_libraries(build_type, ubuntu_release, jobs, use_goma):
|
||||||
archive_name = '%s-%s' % (build_type, ubuntu_release)
|
build_dir = 'out/Instrumented-%s' % build_type
|
||||||
build_dir = 'out/Instrumented-%s' % archive_name
|
|
||||||
if not os.path.exists(build_dir):
|
if not os.path.exists(build_dir):
|
||||||
os.makedirs(build_dir)
|
os.makedirs(build_dir)
|
||||||
|
|
||||||
@@ -58,15 +55,20 @@ def build_libraries(build_type, ubuntu_release, jobs, use_goma):
|
|||||||
with open(os.path.join(build_dir, 'args.gn'), 'w') as f:
|
with open(os.path.join(build_dir, 'args.gn'), 'w') as f:
|
||||||
f.write('\n'.join(gn_args) + '\n')
|
f.write('\n'.join(gn_args) + '\n')
|
||||||
subprocess.check_call(['gn', 'gen', build_dir, '--check'])
|
subprocess.check_call(['gn', 'gen', build_dir, '--check'])
|
||||||
subprocess.check_call(['ninja', '-j%d' % jobs, '-C', build_dir,
|
subprocess.check_call([
|
||||||
'third_party/instrumented_libraries:locally_built'])
|
'ninja',
|
||||||
with tarfile.open('%s.tgz' % archive_name, mode='w:gz') as f:
|
'-j%d' % jobs, '-C', build_dir,
|
||||||
f.add('%s/instrumented_libraries/lib' % build_dir,
|
'third_party/instrumented_libraries/%s:locally_built' % ubuntu_release
|
||||||
arcname='lib',
|
])
|
||||||
filter=_tar_filter)
|
with tarfile.open('%s.tgz' % build_type, mode='w:gz') as f:
|
||||||
f.add('%s/instrumented_libraries/sources' % build_dir,
|
f.add(
|
||||||
arcname='sources',
|
'%s/instrumented_libraries/lib' % build_dir,
|
||||||
filter=_tar_filter)
|
arcname='lib',
|
||||||
|
filter=_tar_filter)
|
||||||
|
f.add(
|
||||||
|
'%s/instrumented_libraries/sources' % build_dir,
|
||||||
|
arcname='sources',
|
||||||
|
filter=_tar_filter)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -79,46 +81,52 @@ def main():
|
|||||||
type=int,
|
type=int,
|
||||||
default=8,
|
default=8,
|
||||||
help='the default number of jobs to use when running ninja')
|
help='the default number of jobs to use when running ninja')
|
||||||
parser.add_argument('--parallel',
|
parser.add_argument(
|
||||||
action='store_true',
|
'--parallel',
|
||||||
default=False,
|
action='store_true',
|
||||||
help='whether to run all instrumented builds in parallel')
|
default=False,
|
||||||
parser.add_argument('--use_goma',
|
help='whether to run all instrumented builds in parallel')
|
||||||
action='store_true',
|
parser.add_argument(
|
||||||
default=False,
|
'--use_goma',
|
||||||
help='whether to use goma to compile')
|
action='store_true',
|
||||||
parser.add_argument('build_type',
|
default=False,
|
||||||
nargs='*',
|
help='whether to use goma to compile')
|
||||||
default='all',
|
parser.add_argument(
|
||||||
choices=BUILD_TYPES.keys() + ['all'],
|
'build_type',
|
||||||
help='the type of instrumented library to build')
|
nargs='*',
|
||||||
|
default='all',
|
||||||
|
choices=BUILD_TYPES.keys() + ['all'],
|
||||||
|
help='the type of instrumented library to build')
|
||||||
|
parser.add_argument(
|
||||||
|
'release', help='the name of the Ubuntu release to build with')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.build_type == 'all' or 'all' in args.build_type:
|
if args.build_type == 'all' or 'all' in args.build_type:
|
||||||
args.build_type = BUILD_TYPES.keys()
|
args.build_type = BUILD_TYPES.keys()
|
||||||
|
|
||||||
ubuntu_release = _get_release()
|
if args.release != _get_release():
|
||||||
if ubuntu_release != SUPPORTED_RELEASE:
|
raise IncorrectReleaseError(
|
||||||
raise UnsupportedReleaseError('%s is not a supported release' %
|
'trying to build for %s but the current release is %s' %
|
||||||
_get_release())
|
(args.release, _get_release()))
|
||||||
build_types = sorted(set(args.build_type))
|
build_types = sorted(set(args.build_type))
|
||||||
if args.parallel:
|
if args.parallel:
|
||||||
procs = []
|
procs = []
|
||||||
for build_type in build_types:
|
for build_type in build_types:
|
||||||
proc = multiprocessing.Process(target=build_libraries,
|
proc = multiprocessing.Process(
|
||||||
args=(build_type, ubuntu_release,
|
target=build_libraries,
|
||||||
args.jobs, args.use_goma))
|
args=(build_type, args.release, args.jobs, args.use_goma))
|
||||||
proc.start()
|
proc.start()
|
||||||
procs.append(proc)
|
procs.append(proc)
|
||||||
for proc in procs:
|
for proc in procs:
|
||||||
proc.join()
|
proc.join()
|
||||||
else:
|
else:
|
||||||
for build_type in build_types:
|
for build_type in build_types:
|
||||||
build_libraries(build_type, ubuntu_release, args.jobs, args.use_goma)
|
build_libraries(build_type, args.release, args.jobs, args.use_goma)
|
||||||
print 'To upload, run:'
|
print 'To upload, run:'
|
||||||
for build_type in build_types:
|
for build_type in build_types:
|
||||||
print('upload_to_google_storage.py -b '
|
print(
|
||||||
'chromium-instrumented-libraries %s-%s.tgz' %
|
'upload_to_google_storage.py -b '
|
||||||
(build_type, ubuntu_release))
|
'chromium-instrumented-libraries %s-%s.tgz' %
|
||||||
|
(build_type, args.release))
|
||||||
print 'You should then commit the resulting .sha1 files.'
|
print 'You should then commit the resulting .sha1 files.'
|
||||||
|
|
||||||
|
|
||||||
|
@@ -12,8 +12,7 @@ import sys
|
|||||||
|
|
||||||
|
|
||||||
def get_archive_name(archive_prefix):
|
def get_archive_name(archive_prefix):
|
||||||
release = 'xenial'
|
return archive_prefix + '.tgz'
|
||||||
return '%s-%s.tgz' % (archive_prefix, release)
|
|
||||||
|
|
||||||
|
|
||||||
def main(archive_prefix, archive_dir, target_dir, stamp_dir=None):
|
def main(archive_prefix, archive_dir, target_dir, stamp_dir=None):
|
||||||
|
852
third_party/instrumented_libraries/xenial/BUILD.gn
vendored
Normal file
852
third_party/instrumented_libraries/xenial/BUILD.gn
vendored
Normal file
@@ -0,0 +1,852 @@
|
|||||||
|
# Copyright 2021 The Chromium Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
import("//build/config/python.gni")
|
||||||
|
import("//build/config/sanitizers/sanitizers.gni")
|
||||||
|
import("//build/toolchain/goma.gni")
|
||||||
|
|
||||||
|
group("locally_built") {
|
||||||
|
visibility = [ "//third_party/instrumented_libraries:deps" ]
|
||||||
|
deps = [
|
||||||
|
":atk1.0",
|
||||||
|
":brltty",
|
||||||
|
":dee",
|
||||||
|
":freetype",
|
||||||
|
":harfbuzz",
|
||||||
|
":libappindicator3-1",
|
||||||
|
":libasound2",
|
||||||
|
":libatk-bridge2.0-0",
|
||||||
|
":libatspi2.0-0",
|
||||||
|
":libavahi-client3",
|
||||||
|
":libcairo2",
|
||||||
|
":libcap2",
|
||||||
|
":libcgmanager0",
|
||||||
|
":libcredentialkit_pkcs11",
|
||||||
|
":libcups2",
|
||||||
|
":libcurl3-gnutls",
|
||||||
|
":libdbus-1-3",
|
||||||
|
":libdbus-glib-1-2",
|
||||||
|
":libdbusmenu",
|
||||||
|
":libdbusmenu-glib4",
|
||||||
|
":libexpat1",
|
||||||
|
":libffi6",
|
||||||
|
":libfontconfig1",
|
||||||
|
":libgcrypt20",
|
||||||
|
":libgdk-pixbuf2.0-0",
|
||||||
|
":libglib2.0-0",
|
||||||
|
":libgnome-keyring0",
|
||||||
|
":libgnutls30",
|
||||||
|
":libgpg-error0",
|
||||||
|
":libgtk-3-0",
|
||||||
|
":libidn11",
|
||||||
|
":libido3-0.1-0",
|
||||||
|
":libindicator3-7",
|
||||||
|
":libjasper1",
|
||||||
|
":libjpeg-turbo8",
|
||||||
|
":libldap-2.4-2",
|
||||||
|
":libnih-dbus1",
|
||||||
|
":libnih1",
|
||||||
|
":libnspr4",
|
||||||
|
":libp11-kit0",
|
||||||
|
":libpci3",
|
||||||
|
":libpcre3",
|
||||||
|
":libpixman-1-0",
|
||||||
|
":libpng12-0",
|
||||||
|
":librtmp1",
|
||||||
|
":libsasl2-2",
|
||||||
|
":libsecret",
|
||||||
|
":libtasn1-6",
|
||||||
|
":libudev1",
|
||||||
|
":libunity9",
|
||||||
|
":libva1",
|
||||||
|
":libwayland-client0",
|
||||||
|
":libx11-6",
|
||||||
|
":libxau6",
|
||||||
|
":libxcb1",
|
||||||
|
":libxcomposite1",
|
||||||
|
":libxcursor1",
|
||||||
|
":libxdamage1",
|
||||||
|
":libxdmcp6",
|
||||||
|
":libxext6",
|
||||||
|
":libxfixes3",
|
||||||
|
":libxi6",
|
||||||
|
":libxinerama1",
|
||||||
|
":libxkbcommon0",
|
||||||
|
":libxrandr2",
|
||||||
|
":libxrender1",
|
||||||
|
":libxss1",
|
||||||
|
":libxtst6",
|
||||||
|
":nss",
|
||||||
|
":pango1.0",
|
||||||
|
":pulseaudio",
|
||||||
|
":zlib1g",
|
||||||
|
]
|
||||||
|
data = [ "${root_out_dir}/instrumented_libraries/lib" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
template("instrumented_library") {
|
||||||
|
action(target_name) {
|
||||||
|
script = "scripts/download_build_install.py"
|
||||||
|
build_method = "destdir"
|
||||||
|
if (defined(invoker.build_method)) {
|
||||||
|
build_method = invoker.build_method
|
||||||
|
}
|
||||||
|
|
||||||
|
cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang")
|
||||||
|
cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++")
|
||||||
|
if (use_goma) {
|
||||||
|
cc = "${goma_dir}/gomacc ${cc}"
|
||||||
|
cxx = "${goma_dir}/gomacc ${cxx}"
|
||||||
|
}
|
||||||
|
package_cflags = [
|
||||||
|
"-O2",
|
||||||
|
"-gline-tables-only",
|
||||||
|
"-fPIC",
|
||||||
|
"-w",
|
||||||
|
"-U_FORTIFY_SOURCE",
|
||||||
|
"-fno-omit-frame-pointer",
|
||||||
|
|
||||||
|
"-fsanitize=memory",
|
||||||
|
"-fsanitize-memory-track-origins=${msan_track_origins}",
|
||||||
|
]
|
||||||
|
package_ldflags = [ "-fsanitize=memory" ]
|
||||||
|
if (defined(invoker.package_cflags)) {
|
||||||
|
package_cflags += invoker.package_cflags
|
||||||
|
}
|
||||||
|
if (defined(invoker.package_ldflags)) {
|
||||||
|
package_ldflags += invoker.package_ldflags
|
||||||
|
}
|
||||||
|
if (defined(invoker.deps)) {
|
||||||
|
deps = invoker.deps
|
||||||
|
}
|
||||||
|
product_dir = rebase_path(root_out_dir)
|
||||||
|
intermediate_dir = rebase_path(target_gen_dir)
|
||||||
|
args = [
|
||||||
|
"--build-method=${build_method}",
|
||||||
|
"--cc=${cc}",
|
||||||
|
"--cxx=${cxx}",
|
||||||
|
"--intermediate-dir=${intermediate_dir}",
|
||||||
|
"--libdir=lib",
|
||||||
|
"--package=${target_name}",
|
||||||
|
"--product-dir=${product_dir}",
|
||||||
|
"--cflags=${package_cflags}",
|
||||||
|
"--ldflags=${package_ldflags}",
|
||||||
|
]
|
||||||
|
outputs = [ "${root_out_dir}/instrumented_libraries/${target_name}.txt" ]
|
||||||
|
inputs = []
|
||||||
|
if (defined(invoker.pre_build)) {
|
||||||
|
inputs += [ invoker.pre_build ]
|
||||||
|
args += [ "--pre-build=${invoker.pre_build}" ]
|
||||||
|
}
|
||||||
|
if (defined(invoker.patches)) {
|
||||||
|
inputs += invoker.patches
|
||||||
|
foreach(patch, invoker.patches) {
|
||||||
|
args += [ "--patch=${patch}" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defined(invoker.msan_ignorelist)) {
|
||||||
|
inputs += [ invoker.msan_ignorelist ]
|
||||||
|
args += [ "--sanitizer-ignorelist=${invoker.msan_ignorelist}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (defined(invoker.extra_configure_flags)) {
|
||||||
|
args += [ "--extra-configure-flags=${invoker.extra_configure_flags}" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("atk1.0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("brltty") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--without-viavoice",
|
||||||
|
"--without-theta",
|
||||||
|
"--without-swift",
|
||||||
|
"--bindir=/sbin",
|
||||||
|
"--with-curses=ncursesw",
|
||||||
|
"--disable-stripping",
|
||||||
|
|
||||||
|
# We don't need any of those.
|
||||||
|
"--disable-java-bindings",
|
||||||
|
"--disable-lisp-bindings",
|
||||||
|
"--disable-ocaml-bindings",
|
||||||
|
"--disable-python-bindings",
|
||||||
|
"--disable-tcl-bindings",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("dee") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("freetype") {
|
||||||
|
pre_build = "scripts/pre-build/freetype.sh"
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("harfbuzz") {
|
||||||
|
package_cflags = [ "-Wno-c++11-narrowing" ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--with-graphite2=yes",
|
||||||
|
"--with-gobject",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libappindicator3-1") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
|
||||||
|
"--with-gtk=3",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libasound2") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
pre_build = "scripts/pre-build/libasound2.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libatk-bridge2.0-0") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libatspi2.0-0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libavahi-client3") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--disable-introspection",
|
||||||
|
"--disable-gtk3",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-compat-libdns_sd",
|
||||||
|
"--disable-mono",
|
||||||
|
"--disable-monodoc",
|
||||||
|
"--disable-qt3",
|
||||||
|
"--with-systemdsystemunitdir=/lib/systemd/system",
|
||||||
|
]
|
||||||
|
patches = [ "patches/libavahi-client3.diff" ]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcairo2") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-gtk-doc",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Required due to aclocal version mismatch.
|
||||||
|
pre_build = "scripts/pre-build/autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcap2") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
build_method = "custom_libcap"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcgmanager0") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
|
||||||
|
# Required due to autoconf version mismatch.
|
||||||
|
pre_build = "scripts/pre-build/autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcredentialkit_pkcs11") {
|
||||||
|
build_method = "stub"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcups2") {
|
||||||
|
patches = [ "patches/libcups2.diff" ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# All from debian/rules.
|
||||||
|
"--localedir=/usr/share/cups/locale",
|
||||||
|
"--enable-slp",
|
||||||
|
"--enable-libpaper",
|
||||||
|
"--enable-ssl",
|
||||||
|
"--enable-gnutls",
|
||||||
|
"--disable-openssl",
|
||||||
|
"--enable-threads",
|
||||||
|
"--enable-debug",
|
||||||
|
"--enable-dbus",
|
||||||
|
"--with-dbusdir=/etc/dbus-1",
|
||||||
|
"--enable-gssapi",
|
||||||
|
"--enable-avahi",
|
||||||
|
"--with-pdftops=/usr/bin/gs",
|
||||||
|
"--disable-launchd",
|
||||||
|
"--with-cups-group=lp",
|
||||||
|
"--with-system-groups=lpadmin",
|
||||||
|
"--with-printcap=/var/run/cups/printcap",
|
||||||
|
"--with-log-file-perm=0640",
|
||||||
|
"--with-local_protocols=\"CUPS dnssd\"",
|
||||||
|
"--with-remote_protocols=\"CUPS dnssd\"",
|
||||||
|
"--enable-libusb",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/libcups2.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libcurl3-gnutls") {
|
||||||
|
build_method = "custom_libcurl"
|
||||||
|
|
||||||
|
# Don't generate zsh completions.
|
||||||
|
patches = [ "patches/libcurl3-gnutls.diff" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libdbus-1-3") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--disable-libaudit",
|
||||||
|
"--enable-apparmor",
|
||||||
|
"--enable-systemd",
|
||||||
|
"--libexecdir=/lib/dbus-1.0",
|
||||||
|
"--with-systemdsystemunitdir=/lib/systemd/system",
|
||||||
|
"--disable-tests",
|
||||||
|
"--exec-prefix=/",
|
||||||
|
|
||||||
|
# From dh_auto_configure.
|
||||||
|
"--prefix=/usr",
|
||||||
|
"--localstatedir=/var",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libdbus-glib-1-2") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
# Use system dbus-binding-tool. The just-built one is instrumented but
|
||||||
|
# doesn't have the correct RPATH, and will crash.
|
||||||
|
"--with-dbus-binding-tool=dbus-binding-tool",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libdbusmenu") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--disable-scrollkeeper",
|
||||||
|
"--with-gtk=2",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
"--disable-vala",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libdbusmenu-glib4") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--disable-scrollkeeper",
|
||||||
|
"--enable-gtk-doc",
|
||||||
|
|
||||||
|
# --enable-introspection introduces a build step that attempts to run
|
||||||
|
# a just-built binary and crashes. Vala requires introspection.
|
||||||
|
# TODO(eugenis): find a better fix.
|
||||||
|
"--disable-introspection",
|
||||||
|
"--disable-vala",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libexpat1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libffi6") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libfontconfig1") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-docs",
|
||||||
|
"--sysconfdir=/etc/",
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgcrypt20") {
|
||||||
|
package_ldflags = [ "-Wl,-z,muldefs" ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-noexecstack",
|
||||||
|
"--enable-ld-version-script",
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# http://crbug.com/344505
|
||||||
|
"--disable-asm",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgdk-pixbuf2.0-0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--without-libjasper",
|
||||||
|
"--disable-introspection",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--with-x11",
|
||||||
|
|
||||||
|
# Do not use loadable modules. Same as with Pango, there's no easy way
|
||||||
|
# to make gdk-pixbuf pick instrumented versions over system-installed
|
||||||
|
# ones.
|
||||||
|
"--disable-modules",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/libgdk-pixbuf2.0-0.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libglib2.0-0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-gtk-doc",
|
||||||
|
"--disable-gtk-doc-html",
|
||||||
|
"--disable-gtk-doc-pdf",
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# --with-pcre=system (the default) fails because the system-supplied
|
||||||
|
# PCRE does not support Unicode properties or UTF-8.
|
||||||
|
"--with-pcre=internal",
|
||||||
|
]
|
||||||
|
msan_ignorelist = "ignorelists/msan/libglib2.0-0.txt"
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgnome-keyring0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--enable-tests=no",
|
||||||
|
|
||||||
|
# Make the build less problematic.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
package_ldflags = [ "-Wl,--as-needed" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgnutls30") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
# from debian/rules.
|
||||||
|
"--enable-ld-version-script",
|
||||||
|
"--enable-cxx",
|
||||||
|
"--without-lzo",
|
||||||
|
"--disable-guile",
|
||||||
|
"--with-libgcrypt",
|
||||||
|
"--with-packager=Debian",
|
||||||
|
|
||||||
|
# MSAN is not compatible with instructions such as CPUID.
|
||||||
|
# https://github.com/google/oss-fuzz/issues/578
|
||||||
|
"--disable-hardware-acceleration",
|
||||||
|
]
|
||||||
|
patches = [
|
||||||
|
# Make sure to use the memset/memcmp provided by MSAN, not the
|
||||||
|
# gnutls-provided ones.
|
||||||
|
"patches/libgnutls30.1.diff",
|
||||||
|
|
||||||
|
# Work around several usages of uninitialized memory. The allocated
|
||||||
|
# memory is contained within libgnutls, so will not affect Chromium test
|
||||||
|
# coverage.
|
||||||
|
"patches/libgnutls30.2.diff",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgpg-error0") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libgtk-3-0") {
|
||||||
|
package_cflags = [ "-Wno-return-type" ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--disable-introspection",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-test-print-backend",
|
||||||
|
"--enable-x11-backend",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/libgtk-3-0.sh"
|
||||||
|
patches = [
|
||||||
|
# MSAN does not support GL, so it must be disabled in GTK.
|
||||||
|
# https://www.chromium.org/developers/testing/memorysanitizer#TOC-Disable-OpenGL
|
||||||
|
"patches/libgtk-3-0.diff",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libido3-0.1-0") {
|
||||||
|
package_cflags = [ "-Wno-return-type" ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
|
||||||
|
"--with-gtk=3",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libidn11") {
|
||||||
|
package_ldflags = [ "-Wl,-z,undefs" ]
|
||||||
|
build_method = "debian"
|
||||||
|
pre_build = "scripts/pre-build/libidn.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libindicator3-7") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libjasper1") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-shared=yes",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libjpeg-turbo8") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--with-jpeg8",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libldap-2.4-2") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-slapd",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-debug",
|
||||||
|
"--enable-dynamic",
|
||||||
|
"--enable-syslog",
|
||||||
|
"--enable-proctitle",
|
||||||
|
"--enable-ipv6",
|
||||||
|
"--enable-local",
|
||||||
|
"--with-subdir=ldap",
|
||||||
|
"--with-cyrus-sasl",
|
||||||
|
"--with-threads",
|
||||||
|
"--with-gssapi",
|
||||||
|
"--with-tls=gnutls",
|
||||||
|
"--with-odbc=unixodbc",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Debian adds a custom patch that adds @VERSION_OPTION@, which must
|
||||||
|
# be substituted before building.
|
||||||
|
pre_build = "scripts/pre-build/dh_autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libnih1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
|
||||||
|
pre_build = "scripts/pre-build/libnih1.sh"
|
||||||
|
|
||||||
|
patches = [ "patches/libnih1.diff" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libnih-dbus1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
|
||||||
|
pre_build = "scripts/pre-build/libnih1.sh"
|
||||||
|
|
||||||
|
patches = [ "patches/libnih1.diff" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libnspr4") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--enable-64bit",
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# TSan reports data races on debug variables.
|
||||||
|
"--disable-debug",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/libnspr4.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libp11-kit0") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
|
||||||
|
# Required due to autoconf version mismatch.
|
||||||
|
pre_build = "scripts/pre-build/autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libpci3") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
build_method = "custom_libpci3"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libpcre3") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--enable-utf8",
|
||||||
|
"--enable-unicode-properties",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/dh_autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libpixman-1-0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--disable-gtk",
|
||||||
|
"--disable-silent-rules",
|
||||||
|
|
||||||
|
# Avoid a clang issue. http://crbug.com/449183
|
||||||
|
"--disable-mmx",
|
||||||
|
]
|
||||||
|
patches = [
|
||||||
|
"patches/libpixman-1-0.1.diff",
|
||||||
|
|
||||||
|
# Fix an incompatibility when building with clang.
|
||||||
|
"patches/libpixman-1-0.2.diff",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libpng12-0") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("librtmp1") {
|
||||||
|
build_method = "debian"
|
||||||
|
|
||||||
|
# Ensure we build with clang.
|
||||||
|
patches = [ "patches/librtmp1.diff" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libsasl2-2") {
|
||||||
|
build_method = "debian"
|
||||||
|
pre_build = "scripts/pre-build/libsasl2-2.sh"
|
||||||
|
package_cflags = [ "-Wno-return-type" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libsecret") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# See above.
|
||||||
|
"--disable-introspection",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libtasn1-3") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-ld-version-script",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libtasn1-6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-ld-version-script",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libunity9") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
pre_build = "scripts/pre-build/autogen.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libva1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
pre_build = "scripts/pre-build/libva1.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libwayland-client0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
"--disable-documentation",
|
||||||
|
]
|
||||||
|
|
||||||
|
# Do not use the just-built wayland_scanner because it is not runnable due
|
||||||
|
# to uninstrumented dependencies.
|
||||||
|
extra_configure_flags += [ "--with-host-scanner" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libx11-6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-specs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
msan_ignorelist = "ignorelists/msan/libx11-6.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxau6") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxcb1") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-build-docs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/autoreconf.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxcomposite1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxcursor1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxdamage1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxdmcp6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-docs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxext6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-specs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxfixes3") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxi6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-specs",
|
||||||
|
"--disable-docs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxinerama1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxkbcommon0") {
|
||||||
|
package_ldflags = [ "-Wl,-z,undefs" ]
|
||||||
|
build_method = "debian"
|
||||||
|
pre_build = "scripts/pre-build/xkbcommon.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxrandr2") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxrender1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxss1") {
|
||||||
|
extra_configure_flags = [ "--disable-static" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libxtst6") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-specs",
|
||||||
|
"--disable-static",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("nss") {
|
||||||
|
# TODO(eugenis): get rid of this dependency
|
||||||
|
deps = [ ":libnspr4" ]
|
||||||
|
patches = [ "patches/nss.diff" ]
|
||||||
|
build_method = "custom_nss"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("pango1.0") {
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620
|
||||||
|
"--enable-introspection=no",
|
||||||
|
|
||||||
|
# Pango is normally used with dynamically loaded modules. However,
|
||||||
|
# ensuring pango is able to find instrumented versions of those modules
|
||||||
|
# is a huge pain in the neck. Let's link them statically instead, and
|
||||||
|
# hope for the best.
|
||||||
|
"--with-included-modules=yes",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("pulseaudio") {
|
||||||
|
# New location of libpulsecommon.
|
||||||
|
package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ]
|
||||||
|
extra_configure_flags = [
|
||||||
|
"--disable-static",
|
||||||
|
|
||||||
|
# From debian/rules.
|
||||||
|
"--enable-x11",
|
||||||
|
"--disable-hal-compat",
|
||||||
|
|
||||||
|
# Disable some ARM-related code that fails compilation. No idea why
|
||||||
|
# this even impacts x86-64 builds.
|
||||||
|
"--disable-neon-opt",
|
||||||
|
|
||||||
|
# There's a build failure caused (I think) by a missing include, so skip
|
||||||
|
# building the offending file to avoid maintaining a patch.
|
||||||
|
"--disable-android-hal",
|
||||||
|
]
|
||||||
|
pre_build = "scripts/pre-build/pulseaudio.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("libudev1") {
|
||||||
|
build_method = "debian"
|
||||||
|
pre_build = "scripts/pre-build/udev.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumented_library("zlib1g") {
|
||||||
|
# --disable-static is not supported
|
||||||
|
patches = [ "patches/zlib1g.diff" ]
|
||||||
|
}
|
@@ -69,9 +69,9 @@ class InstrumentedPackageBuilder(object):
|
|||||||
product_dir, 'instrumented_libraries', 'sources', self._package)
|
product_dir, 'instrumented_libraries', 'sources', self._package)
|
||||||
|
|
||||||
self._cflags = unescape_flags(args.cflags)
|
self._cflags = unescape_flags(args.cflags)
|
||||||
if args.sanitizer_blacklist:
|
if args.sanitizer_ignorelist:
|
||||||
blacklist_file = real_path(args.sanitizer_blacklist)
|
ignorelist_file = real_path(args.sanitizer_ignorelist)
|
||||||
self._cflags += ' -fsanitize-blacklist=%s' % blacklist_file
|
self._cflags += ' -fsanitize-blacklist=%s' % ignorelist_file # nocheck
|
||||||
|
|
||||||
self._ldflags = unescape_flags(args.ldflags)
|
self._ldflags = unescape_flags(args.ldflags)
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ def main():
|
|||||||
# This will be run after applying the patches above.
|
# This will be run after applying the patches above.
|
||||||
parser.add_argument('--pre-build', default='')
|
parser.add_argument('--pre-build', default='')
|
||||||
parser.add_argument('--build-method', default='destdir')
|
parser.add_argument('--build-method', default='destdir')
|
||||||
parser.add_argument('--sanitizer-blacklist', default='')
|
parser.add_argument('--sanitizer-ignorelist', default='')
|
||||||
# The LIBDIR argument to configure/make.
|
# The LIBDIR argument to configure/make.
|
||||||
parser.add_argument('--libdir', default='lib')
|
parser.add_argument('--libdir', default='lib')
|
||||||
|
|
Reference in New Issue
Block a user