diff options
author | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 06:20:30 +0000 |
---|---|---|
committer | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 06:20:30 +0000 |
commit | 943a996f1de93d9de66b7fb02375702fdae6edf3 (patch) | |
tree | e7ebdf6aaf7b1206c863c1dce6fa14ff4e946c97 /third_party | |
parent | 8e19f0397480f93707c0d540d093487e86f57c69 (diff) | |
download | chromium_src-943a996f1de93d9de66b7fb02375702fdae6edf3.zip chromium_src-943a996f1de93d9de66b7fb02375702fdae6edf3.tar.gz chromium_src-943a996f1de93d9de66b7fb02375702fdae6edf3.tar.bz2 |
Revert of Instrumented libraries: turn off leak detection when building with ASan. (https://codereview.chromium.org/376733006/)
Reason for revert:
http://build.chromium.org/p/chromium.lkgr/builders/MSAN%20Release%20%28no%20origins%29/builds/41/steps/compile/logs/stdio
FAILED: cd ../../third_party/instrumented_libraries; ../../third_party/instrumented_libraries/download_build_install.py "--product-directory=../../out/Release" "--package=libappindicator1" "--intermediate-directory=../../out/Release/obj/third_party/instrumented_libraries/msan-libappindicator1.gen" "--sanitizer-type=msan" "--extra-configure-flags=--disable-introspection" "--cflags=-O2 -gline-tables-only -fPIC -w -U_FORITFY_SOURCE \"-fsanitize=memory\" \"-fsanitize-memory-track-origins=0\"" "--ldflags=-Wl,-z,origin -Wl,-R,XORIGIN/. \"-fsanitize=memory\"" "--patch=" "--run-before-build=" "--cc=/mnt/data/b/build/goma/gomacc /mnt/data/b/build/slave/MSAN_Release__no_origins_/build/src/third_party/llvm-build/Release+Asserts/bin/clang" "--cxx=/mnt/data/b/build/goma/gomacc /mnt/data/b/build/slave/MSAN_Release__no_origins_/build/src/third_party/llvm-build/Release+Asserts/bin/clang++" "--jobs=1" "--build-method=destdir" "--sanitizer-blacklist=../../out/Release/../../tools/msan/blacklist.txt"
Traceback (most recent call last):
File "../../third_party/instrumented_libraries/download_build_install.py", line 366, in <module>
main()
File "../../third_party/instrumented_libraries/download_build_install.py", line 362, in main
download_build_install(parsed_arguments)
File "../../third_party/instrumented_libraries/download_build_install.py", line 262, in download_build_install
environment = build_environment(parsed_arguments, install_prefix)
File "../../third_party/instrumented_libraries/download_build_install.py", line 232, in build_environment
product_directory,
Original issue's description:
> 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
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281804
TBR=glider@chromium.org,earthdok@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=313751
Review URL: https://codereview.chromium.org/380623002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rwxr-xr-x | third_party/instrumented_libraries/download_build_install.py | 38 | ||||
-rw-r--r-- | third_party/instrumented_libraries/instrumented_libraries.gyp | 1 |
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'], }, |