summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 20:05:15 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 20:05:15 +0000
commit717e908d5396b137c655f8453550f3045a48767e (patch)
treef8e7688d2da5dcd88996efa2393537a5a6ae1292 /third_party
parentd787e19be5526d6c16123aab1f9f731c3e15223f (diff)
downloadchromium_src-717e908d5396b137c655f8453550f3045a48767e.zip
chromium_src-717e908d5396b137c655f8453550f3045a48767e.tar.gz
chromium_src-717e908d5396b137c655f8453550f3045a48767e.tar.bz2
Instrumented libraries: turn off leak detection when building with ASan.
Fixes a build failure. I also did some refactoring. BUG=313751 TBR=glider@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/376733006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rwxr-xr-xthird_party/instrumented_libraries/download_build_install.py38
-rw-r--r--third_party/instrumented_libraries/instrumented_libraries.gyp1
2 files changed, 25 insertions, 14 deletions
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py
index dd5cc45..82072abe 100755
--- a/third_party/instrumented_libraries/download_build_install.py
+++ b/third_party/instrumented_libraries/download_build_install.py
@@ -205,21 +205,19 @@ def build_and_install(parsed_arguments, environment, install_prefix):
libcap2_make_install(parsed_arguments, environment, install_prefix)
elif parsed_arguments.build_method == 'custom_libpci3':
libpci3_make_install(parsed_arguments, environment, install_prefix)
- elif parsed_arguments.build_method == 'custom_libappindicator1':
- environment['CSC'] = '/usr/bin/mono-csc'
- destdir_configure_make_install(
- parsed_arguments, environment, install_prefix)
else:
raise Exception('Unrecognized build method: %s' %
parsed_arguments.build_method)
+
def unescape_flags(s):
# GYP escapes the build flags as if they are going to be inserted directly
# into the command line. Since we pass them via CFLAGS/LDFLAGS, we must drop
# the double quotes accordingly.
return ' '.join(shlex.split(s))
-def download_build_install(parsed_arguments):
+
+def build_environment(parsed_arguments, install_prefix):
environment = os.environ.copy()
# The CC/CXX environment variables take precedence over the command line
# flags.
@@ -228,10 +226,6 @@ def download_build_install(parsed_arguments):
if 'CXX' not in environment and parsed_arguments.cxx:
environment['CXX'] = parsed_arguments.cxx
- product_directory = os.path.normpath('%s/%s' % (
- get_script_absolute_path(),
- parsed_arguments.product_directory))
-
cflags = unescape_flags(parsed_arguments.cflags)
if parsed_arguments.sanitizer_blacklist:
cflags += ' -fsanitize-blacklist=%s/%s' % (
@@ -240,15 +234,33 @@ def download_build_install(parsed_arguments):
environment['CFLAGS'] = cflags
environment['CXXFLAGS'] = cflags
- install_prefix = '%s/instrumented_libraries/%s' % (
- product_directory,
- parsed_arguments.sanitizer_type)
-
ldflags = unescape_flags(parsed_arguments.ldflags)
# Make sure the linker searches the instrumented libraries dir for
# library dependencies.
environment['LDFLAGS'] = '%s -L%s/lib' % (ldflags, install_prefix)
+ if parsed_arguments.sanitizer_type == 'asan':
+ # Do not report leaks during the build process.
+ environment['ASAN_OPTIONS'] = '%s:detect_leaks=0' % \
+ environment.get('ASAN_OPTIONS', '')
+
+ # libappindicator1 needs this.
+ environment['CSC'] = '/usr/bin/mono-csc'
+ return environment
+
+
+
+def download_build_install(parsed_arguments):
+ product_directory = os.path.normpath('%s/%s' % (
+ get_script_absolute_path(),
+ parsed_arguments.product_directory))
+
+ install_prefix = '%s/instrumented_libraries/%s' % (
+ product_directory,
+ parsed_arguments.sanitizer_type)
+
+ environment = build_environment(parsed_arguments, install_prefix)
+
package_directory = '%s/%s' % (parsed_arguments.intermediate_directory,
parsed_arguments.package)
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp
index 5c8309f..847f378 100644
--- a/third_party/instrumented_libraries/instrumented_libraries.gyp
+++ b/third_party/instrumented_libraries/instrumented_libraries.gyp
@@ -560,7 +560,6 @@
'--disable-introspection',
],
'dependencies=': [],
- 'build_method': 'custom_libappindicator1',
'jobs': 1,
'includes': ['standard_instrumented_package_target.gypi'],
},