Open GoogleCodeExporter opened 9 years ago
It sounds like you failed to declare that 'target2' was a hard_dependency, and
thus it was pruned from 'target1's dependency list, since they're both
static_library target types.
http://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependencies
mentions this
If a target of type != 'none' is going to generate files that will be used by
other targets (eg: headers being included), then you should ensure that such a
target is marked hard_dependency. This will prevent it from being pruned.
Further, if those generated header files are imported as part of a targets
public headers (eg: target1 had a 'foo.h' that #imports generated.h), then
target1 should make sure to export_dependent_settings: ['target2'], so that its
dependents know about target2.
This will ensure that target1 (and, if exported, its dependents) do not attempt
to compile until target2 has compiled & ran its actions (including generating
headers)
Original comment by rsleevi@chromium.org
on 28 Jun 2012 at 8:40
Aha, that's exactly it. Thanks for this.
Not sure how to close the bug, but working as intended :)
Original comment by agri...@google.com
on 29 Jun 2012 at 1:09
Original issue reported on code.google.com by
agri...@google.com
on 17 Apr 2012 at 11:52