Index: third_party/instrumented_libraries/download_build_install.py |
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py |
index 82072abede0ca07f945b50ad29602ed28f66a4bc..dd5cc45fde00f0cf65455b5eaf527efae0e315c7 100755 |
--- a/third_party/instrumented_libraries/download_build_install.py |
+++ b/third_party/instrumented_libraries/download_build_install.py |
@@ -205,10 +205,13 @@ |
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 |
@@ -216,8 +219,7 @@ |
# 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 @@ |
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 @@ |
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) |