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

Issue 11642018: Add a postbuild action for executables built with ASan on Mac OS. (Closed)

Created:
8 years ago by Alexander Potapenko
Modified:
7 years, 9 months ago
CC:
chromium-reviews, Nico
Visibility:
Public.

Description

Add a postbuild action for executables built with ASan on Mac OS. The action will copy the ASan dynamic runtime to the same dir where the executable is. BUG=170629 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187297

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add a postbuild action for executables built with ASan on Mac OS. #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 2

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Total comments: 21

Patch Set 22 : #

Patch Set 23 : #

Patch Set 24 : #

Patch Set 25 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -0 lines) Patch
M build/all.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -0 lines 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +28 lines, -0 lines 0 comments Download
A build/mac/asan.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +32 lines, -0 lines 0 comments Download
A build/mac/copy_asan_runtime_dylib.sh View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +53 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (0 generated)
Alexander Potapenko
Please take a look
8 years ago (2012-12-19 12:04:25 UTC) #1
Mark Mentovai
Doing this in a postbuild once for each target sucks. Did anything come of the ...
8 years ago (2012-12-19 13:53:38 UTC) #2
Alexander Potapenko
Just realized that the shell script must be executed for each target, because install_name_tool must ...
7 years, 11 months ago (2013-01-16 13:54:05 UTC) #3
Alexander Potapenko
Add a postbuild action for executables built with ASan on Mac OS. The action will ...
7 years, 11 months ago (2013-01-16 14:01:08 UTC) #4
Mark Mentovai
What’s wrong with the path? Can you just fix the LC_ID_DYLIB stored in the dylib ...
7 years, 11 months ago (2013-01-16 14:07:16 UTC) #5
Alexander Potapenko
On 2013/01/16 14:07:16, Mark Mentovai wrote: > What’s wrong with the path? > > Can ...
7 years, 11 months ago (2013-01-16 14:25:42 UTC) #6
Alexander Potapenko
Apparently it's not possible to make each executable depend on a specific target in common.gypi ...
7 years, 11 months ago (2013-01-23 12:08:53 UTC) #7
Nico
On Wed, Jan 23, 2013 at 4:08 AM, <glider@chromium.org> wrote: > Apparently it's not possible ...
7 years, 11 months ago (2013-01-23 15:14:43 UTC) #8
Alexander Potapenko
I can give gyp 115 a shot by special-casing <(DEPTH) (as far as I understood ...
7 years, 11 months ago (2013-01-23 15:18:48 UTC) #9
Alexander Potapenko
On 2013/01/23 15:18:48, Alexander Potapenko wrote: > I can give gyp 115 a shot by ...
7 years, 10 months ago (2013-01-28 14:16:31 UTC) #10
_com_google_glider
After several attempts to define a default dependency for each executable target I'm not that ...
7 years, 10 months ago (2013-02-04 17:58:32 UTC) #11
Mark Mentovai
Can you make every target (not just executables) depend on your dependency, but then have ...
7 years, 10 months ago (2013-02-04 18:05:42 UTC) #12
Alexander Potapenko
On 2013/02/04 18:05:42, Mark Mentovai wrote: > Can you make every target (not just executables) ...
7 years, 10 months ago (2013-02-08 14:36:33 UTC) #13
Mark Mentovai
https://codereview.chromium.org/11642018/diff/22001/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/11642018/diff/22001/build/common.gypi#newcode2403 build/common.gypi:2403: ['1==1', { You’re not actually in target_defaults here, so… ...
7 years, 10 months ago (2013-02-08 17:45:12 UTC) #14
Alexander Potapenko
> or you can leave it here at the root and put it in its ...
7 years, 10 months ago (2013-02-11 13:30:12 UTC) #15
Mark Mentovai
Because asan_dynamic_runtime winds up depending on itself?
7 years, 10 months ago (2013-02-11 13:51:39 UTC) #16
Alexander Potapenko
This one: > meaning. This should be in common.gypi’s > > target_defaults > conditions > ...
7 years, 10 months ago (2013-02-11 13:52:21 UTC) #17
Mark Mentovai
You said “cycle in the dependency graph,” but I don’t see that happening with patch ...
7 years, 10 months ago (2013-02-11 14:06:58 UTC) #18
Alexander Potapenko
On 2013/02/11 14:06:58, Mark Mentovai wrote: > You said “cycle in the dependency graph,” but ...
7 years, 10 months ago (2013-02-11 14:15:34 UTC) #19
Alexander Potapenko
> Patch set 6 doesn’t work because you didn’t put condition inside target_defaults > (1555), ...
7 years, 10 months ago (2013-02-11 14:42:32 UTC) #20
Mark Mentovai
I think you can provide a variable in the asan_dynamic_runtime target that will only be ...
7 years, 10 months ago (2013-02-11 14:48:05 UTC) #21
Alexander Potapenko
On 2013/02/11 14:48:05, Mark Mentovai wrote: > I think you can provide a variable in ...
7 years, 10 months ago (2013-02-11 16:52:40 UTC) #22
Mark Mentovai
https://codereview.chromium.org/11642018/diff/23008/build/asan.gyp File build/asan.gyp (right): https://codereview.chromium.org/11642018/diff/23008/build/asan.gyp#newcode11 build/asan.gyp:11: 'asan_sentinel%': 1, Does removing this % change anything? https://codereview.chromium.org/11642018/diff/23008/build/asan.gyp#newcode16 ...
7 years, 10 months ago (2013-02-11 17:18:19 UTC) #23
Alexander Potapenko
>https://codereview.chromium.org/11642018/diff/23008/build/asan.gyp#newcode11 > build/asan.gyp:11: 'asan_sentinel%': 1, > Does removing this % change anything? Nope. > https://codereview.chromium.org/11642018/diff/23008/build/asan.gyp#newcode16 ...
7 years, 10 months ago (2013-02-11 17:34:17 UTC) #24
Alexander Potapenko
To summarize, making a target on which every other target depends ends up in a ...
7 years, 10 months ago (2013-02-18 11:59:53 UTC) #25
Nico
Between which targets does the cycle exist? Given a cycle-free target graph, I don't understand ...
7 years, 10 months ago (2013-02-18 12:14:49 UTC) #26
Alexander Potapenko
On 2013/02/18 12:14:49, Nico wrote: > Between which targets does the cycle exist? GYP does ...
7 years, 10 months ago (2013-02-18 13:04:20 UTC) #27
Nico
Alright, since this is asan-only and this is apparently non-trivial to do I suppose I ...
7 years, 10 months ago (2013-02-18 13:09:45 UTC) #28
Alexander Potapenko
Updated the CL to use the postbuild script.
7 years, 10 months ago (2013-02-18 16:51:05 UTC) #29
_com_google_glider
Mark, what do you think of the proposed solution? On Feb 18, 2013 8:51 PM, ...
7 years, 10 months ago (2013-02-20 05:01:32 UTC) #30
Mark Mentovai
I’m still not in love with it. I wonder if we can enhance GYP unobtrusively ...
7 years, 10 months ago (2013-02-20 13:44:33 UTC) #31
Alexander Potapenko
How about just allowing a target to depend on itself? If you think it's less ...
7 years, 10 months ago (2013-02-20 15:53:06 UTC) #32
Nico
Mark: Since the postbuild is only active in asan mode and since asan clang is ...
7 years, 10 months ago (2013-02-20 15:55:56 UTC) #33
Mark Mentovai
What’s suffering because asan clang is behind?
7 years, 10 months ago (2013-02-20 16:16:12 UTC) #34
Nico
As far as I know not too much (devs can't run asan locally, see yesterday's ...
7 years, 10 months ago (2013-02-20 16:21:39 UTC) #35
_com_google_glider
Devs can run asan locally with the older Clang, but unit_tests don't work well with ...
7 years, 10 months ago (2013-02-20 16:47:46 UTC) #36
Alexander Potapenko
message: Uploaded Patch Set 15. I've attempted to allow self-dependencies in GYP so that it ...
7 years, 10 months ago (2013-02-21 11:07:53 UTC) #37
Alexander Potapenko
Mark, can you please provide your vision of how the diff of common.gypi should look ...
7 years, 10 months ago (2013-02-25 16:28:01 UTC) #38
Mark Mentovai
My idea was to do 'target_defaults': { 'dependencies': [ '<(DEPTH)/build/asan.gyp:asan_dynamic_runtime', ], 'prune_self_dependency': 1, }, And ...
7 years, 10 months ago (2013-02-25 16:51:25 UTC) #39
Alexander Potapenko
FTR, the reports about multiple rules generating true in https://codereview.chromium.org/11642018/#msg37 were caused by me having ...
7 years, 10 months ago (2013-02-25 17:14:13 UTC) #40
Alexander Potapenko
Patch Set 18 appears to work fine with stand-alone executables (and is way prettier than ...
7 years, 9 months ago (2013-03-06 13:31:18 UTC) #41
Mark Mentovai
How are the executables finding your dylib? Meaning: what does otool -L have to say ...
7 years, 9 months ago (2013-03-06 13:52:28 UTC) #42
Alexander Potapenko
The dylib's location is @executable_path/libclang_rt.asan_osx_dynamic.dylib by default. We can invoke install_name_tool for the .app bundles ...
7 years, 9 months ago (2013-03-06 14:09:42 UTC) #43
Mark Mentovai
I think that we should copy the dylibs into the bundles. If we ever release ...
7 years, 9 months ago (2013-03-06 14:12:40 UTC) #44
Alexander Potapenko
Patch Set 21 does teh job for both small bundles (crash_report_sender.app) and Chromium.app (including the ...
7 years, 9 months ago (2013-03-06 16:04:07 UTC) #45
Mark Mentovai
https://codereview.chromium.org/11642018/diff/55003/build/mac/asan.gyp File build/mac/asan.gyp (right): https://codereview.chromium.org/11642018/diff/55003/build/mac/asan.gyp#newcode16 build/mac/asan.gyp:16: '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.asan_osx_dynamic.dylib', I don’t like this at all. How often ...
7 years, 9 months ago (2013-03-06 17:03:19 UTC) #46
Alexander Potapenko
Fixed the comments in the shell script. Will ask Nico about the symlink to current. ...
7 years, 9 months ago (2013-03-07 08:29:22 UTC) #47
Mark Mentovai
LGTM. Please follow up after the “current” symbolic link thing has made it into the ...
7 years, 9 months ago (2013-03-07 17:03:20 UTC) #48
Alexander Potapenko
7 years, 9 months ago (2013-03-11 15:30:24 UTC) #49
Message was sent while issue was closed.
Committed patchset #25 manually as r187297 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698