Skip to content

Commit

Permalink
Add libpulseaudio and libasound to instrumented libraries.
Browse files Browse the repository at this point in the history
BUG=313751
R=glider@chromium.org

Review URL: https://codereview.chromium.org/149433004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247936 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
earthdok@chromium.org committed Jan 30, 2014
1 parent 0c5fde3 commit 48da3d2
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
15 changes: 15 additions & 0 deletions third_party/instrumented_libraries/instrumented_libraries.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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'],
},
],
}
11 changes: 11 additions & 0 deletions third_party/instrumented_libraries/libasound2.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions third_party/instrumented_libraries/pulseaudio.diff
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions third_party/instrumented_libraries/pulseaudio.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 48da3d2

Please sign in to comment.