Figure out GYP postbuilds in GN |
|||
Issue descriptionThe 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).
,
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.
,
Jun 21 2016
I think we've more or less done everything we're planning to do here ...
,
Jun 21 2016
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 |
|||
Comment 1 by thakis@chromium.org
, Apr 27 2016