diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp index e87c2f44603ec5..e4eaa318de4395 100644 --- a/third_party/instrumented_libraries/instrumented_libraries.gyp +++ b/third_party/instrumented_libraries/instrumented_libraries.gyp @@ -64,6 +64,8 @@ '<(_sanitizer_type)-libdbus-glib-1-2', '<(_sanitizer_type)-nss', '<(_sanitizer_type)-libfontconfig1', + '<(_sanitizer_type)-pulseaudio', + '<(_sanitizer_type)-libasound2', ], 'conditions': [ ['asan==1', { @@ -284,5 +286,18 @@ ], 'includes': ['standard_instrumented_library_target.gypi'], }, + { + 'library_name': 'pulseaudio', + 'dependencies=': [], + 'run_before_build': 'pulseaudio.sh', + 'custom_configure_flags': '--with-udev-rules-dir=<(INTERMEDIATE_DIR)/udev/rules.d', + 'includes': ['standard_instrumented_library_target.gypi'], + }, + { + 'library_name': 'libasound2', + 'dependencies=': [], + 'run_before_build': 'libasound2.sh', + 'includes': ['standard_instrumented_library_target.gypi'], + }, ], } diff --git a/third_party/instrumented_libraries/libasound2.sh b/third_party/instrumented_libraries/libasound2.sh new file mode 100755 index 00000000000000..0d1e6090275968 --- /dev/null +++ b/third_party/instrumented_libraries/libasound2.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright 2013 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. + +# This script does some preparations before build of instrumented libasound2. + +libtoolize --force --copy +aclocal +autoconf +automake diff --git a/third_party/instrumented_libraries/pulseaudio.diff b/third_party/instrumented_libraries/pulseaudio.diff new file mode 100644 index 00000000000000..fc2ca0d297c783 --- /dev/null +++ b/third_party/instrumented_libraries/pulseaudio.diff @@ -0,0 +1,16 @@ +diff -rupN ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h +--- ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2011-10-20 16:54:16.000000000 +0400 ++++ ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2014-01-30 16:57:43.113946495 +0400 +@@ -29,8 +29,11 @@ + + #include "sbc_primitives.h" + ++// The inline asm causes errors in clang builds. We don't want inline asm in ++// instrumented builds anyway. + #if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) && \ +- !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) ++ !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) && \ ++ !defined(__clang__) + + #define SBC_BUILD_WITH_MMX_SUPPORT + diff --git a/third_party/instrumented_libraries/pulseaudio.sh b/third_party/instrumented_libraries/pulseaudio.sh new file mode 100755 index 00000000000000..95ddbb3c32c318 --- /dev/null +++ b/third_party/instrumented_libraries/pulseaudio.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Copyright 2013 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. + +# This script does some preparations before build of instrumented pulseaudio. + +# Disable problematic assembly in clang builds. +patch -p1 < $(dirname ${BASH_SOURCE[0]})/pulseaudio.diff