summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xthird_party/instrumented_libraries/download_build_install.py38
-rw-r--r--third_party/instrumented_libraries/instrumented_libraries.gyp1
2 files changed, 14 insertions, 25 deletions
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py
index 82072abe..dd5cc45 100755
--- a/third_party/instrumented_libraries/download_build_install.py
+++ b/third_party/instrumented_libraries/download_build_install.py
@@ -205,19 +205,21 @@ 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 build_environment(parsed_arguments, install_prefix):
+def download_build_install(parsed_arguments):
environment = os.environ.copy()
# The CC/CXX environment variables take precedence over the command line
# flags.
@@ -226,6 +228,10 @@ def build_environment(parsed_arguments, install_prefix):
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' % (
@@ -234,32 +240,14 @@ def build_environment(parsed_arguments, install_prefix):
environment['CFLAGS'] = cflags
environment['CXXFLAGS'] = cflags
- 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)
+ 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)
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 847f378..5c8309f 100644
--- a/third_party/instrumented_libraries/instrumented_libraries.gyp
+++ b/third_party/instrumented_libraries/instrumented_libraries.gyp
@@ -560,6 +560,7 @@
'--disable-introspection',
],
'dependencies=': [],
+ 'build_method': 'custom_libappindicator1',
'jobs': 1,
'includes': ['standard_instrumented_package_target.gypi'],
},