New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 607292 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Figure out GYP postbuilds in GN

Project Member Reported by rsesek@chromium.org, Apr 27 2016

Issue description

The GYP build has the concept of "postbuilds" but GN does not. Postbuilds are similar to actions but have two unique properties in comparison:

1) They do not need to generate outputs. They can either be execute-only actions (no output) or operate-in-place actions (the output file is the same as the input file).
2) They run after the target has been built, rather than before as a dependency.

For (2) there is an easy workaround in GN: use a group() as the final target that depends on the "postbuild" action, which depends on the actual build target.

For (1) there isn't such a clear-cut answer. We may need some kind of specialized action whose output is a stamp file of the input. Currently there's no way to do that via the toolchain's stamp tool, though (but an action script could write a fake stamp).
 

Comment 1 by thakis@chromium.org, Apr 27 2016

3) If a postbuild on a target fails, that target is deleted

Comment 2 by thakis@chromium.org, Apr 27 2016

One thing that we do via postbuilds with gyp on Mac is stripping. On gyp/Android, we do this with a chain of actions instead, chained on stamp files (https://code.google.com/p/chromium/codesearch#chromium/src/build/java_apk.gypi&l=423), and then build a wrapper target ("foo_apk" instead of "foo") and the wrapper depends on "foo" but also runs all these actions after building that.
Status: Fixed (was: Available)
I think we've more or less done everything we're planning to do here ...

Comment 4 by rsesek@chromium.org, Jun 21 2016

Status: WontFix (was: Fixed)
Yeah, the end result is that we didn't end up creating postbuilds at all.

To solve dSYMs and stripping, we created build/toolchain/mac/linker_driver.py. Everything else we solved by chaining actions.

Sign in to add a comment