Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Issue 2188473002: [Mac/GN] Configure ASan for bundled targets. (Closed)

Created:
4 years, 4 months ago by Robert Sesek
Modified:
4 years, 4 months ago
Reviewers:
CC:
chromium-reviews, Peter Beverloo, mlamouri+watch-content_chromium.org, jam, jochen+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac/GN] Configure ASan for bundled targets. DO NOT SUBMIT When using ASAn, the libclang_rt.asan_osx_dynamic.dylib must be located at load-time, but the library has an @executable_path-based install name. For bundled targets, the library cannot be found because the executable is not in the root out dir, where the library is located. This adds a new -Wcrl,installname,old,new linker_driver.py command to allow changing a dependent shared library name at link-time. This calls `install_name_tool -change` after linking the target. By using the new linker_driver.py flag, the library paths for bundled targets can be fixed up to locate the ASan runtime after it has been copied as a bundle_data. BUG=630322

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -5 lines) Patch
M build/config/sanitizers/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M build/config/sanitizers/sanitizers.gni View 1 chunk +4 lines, -0 lines 0 comments Download
M build/toolchain/mac/linker_driver.py View 3 chunks +28 lines, -0 lines 0 comments Download
M chrome/BUILD.gn View 4 chunks +20 lines, -1 line 0 comments Download
M content/shell/BUILD.gn View 4 chunks +17 lines, -0 lines 0 comments Download
M tools/mb/mb_config.pyl View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 1 (1 generated)
Robert Sesek
4 years, 4 months ago (2016-07-27 18:13:56 UTC) #1
Description was changed from

==========
[Mac/GN] Configure ASan for bundled targets.

When using ASAn, the libclang_rt.asan_osx_dynamic.dylib must be located at
load-time, but the library has an @executable_path-based install name. For
bundled targets, the library cannot be found because the executable is not in
the root out dir, where the library is located.

This adds a new -Wcrl,installname,old,new linker_driver.py command to allow
changing a dependent shared library name at link-time. This calls
`install_name_tool -change` after linking the target.

By using the new linker_driver.py flag, the library paths for bundled targets
can be fixed up to locate the ASan runtime after it has been copied as a
bundle_data.

BUG=630322
==========

to

==========
[Mac/GN] Configure ASan for bundled targets.

DO NOT SUBMIT

When using ASAn, the libclang_rt.asan_osx_dynamic.dylib must be located at
load-time, but the library has an @executable_path-based install name. For
bundled targets, the library cannot be found because the executable is not in
the root out dir, where the library is located.

This adds a new -Wcrl,installname,old,new linker_driver.py command to allow
changing a dependent shared library name at link-time. This calls
`install_name_tool -change` after linking the target.

By using the new linker_driver.py flag, the library paths for bundled targets
can be fixed up to locate the ASan runtime after it has been copied as a
bundle_data.

BUG=630322
==========

Powered by Google App Engine
This is Rietveld 408576698