| Index: build/android/pylib/valgrind_tools.py
|
| diff --git a/build/android/pylib/valgrind_tools.py b/build/android/pylib/valgrind_tools.py
|
| index 99c530d96aa0de9629e471639fedad3439469df9..22ac39b4ba2247a76e25e93fdfcde3dcbba4185d 100644
|
| --- a/build/android/pylib/valgrind_tools.py
|
| +++ b/build/android/pylib/valgrind_tools.py
|
| @@ -22,6 +22,7 @@ Call tool.CleanUpEnvironment().
|
| """
|
| # pylint: disable=R0201
|
|
|
| +import glob
|
| import os.path
|
| import subprocess
|
| import sys
|
| @@ -103,12 +104,19 @@ class AddressSanitizerTool(BaseTool):
|
| # This is required because ASan is a compiler-based tool, and md5sum
|
| # includes instrumented code from base.
|
| device.old_interface.SetUtilWrapper(self.GetUtilWrapper())
|
| + libs = glob.glob(os.path.join(DIR_SOURCE_ROOT,
|
| + 'third_party/llvm-build/Release+Asserts/',
|
| + 'lib/clang/*/lib/linux/',
|
| + 'libclang_rt.asan-arm-android.so'))
|
| + assert len(libs) == 1
|
| + self._lib = libs[0]
|
|
|
| def CopyFiles(self):
|
| """Copies ASan tools to the device."""
|
| subprocess.call([os.path.join(DIR_SOURCE_ROOT,
|
| 'tools/android/asan/asan_device_setup.sh'),
|
| '--device', self._device.old_interface.GetDevice(),
|
| + '--lib', self._lib,
|
| '--extra-options', AddressSanitizerTool.EXTRA_OPTIONS])
|
| self._device.old_interface.WaitForDevicePm()
|
|
|
|
|