Bug 76836
Summary: | [meta] Stop rebuilding .h/.cpp files generated by unchanged IDLs | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kentaro Hara <haraken> |
Component: | WebCore Misc. | Assignee: | Kentaro Hara <haraken> |
Status: | NEW | ||
Severity: | Normal | CC: | abarth, achristensen, darin, morrita |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 76841, 76846, 76874, 76918, 76920, 76922, 76923, 76926, 76970 | ||
Bug Blocks: |
Kentaro Hara
Currently, if *any* of IDL files is updated, then generate-bindings.pl runs for *all* IDL files, and all .h/.cpp files are re-generated and rebuilt.
We can stop the redundant rebuilding by having CodeGenerators write the output .h/.cpp file to a temp file and then overwrite the .h/.cpp only if the bytes differ.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kentaro Hara
I'll get things done in the following steps:
[1] Remove finish() from CodeGeneratorV8.pm.
[2] Remove finish() from CodeGeneratorJS.pm.
[3] Remove finish() from CodeGenerator{ObjC,GObject,CPP}.pm and CodeGenerator.pm.
[4] Make a change on CodeGeneratorV8.pm and CodeGenerator.pm to overwrite .h/.cpp files only when the bytes differ.
[5] Make similar changes on CodeGeneratorJS.pm.
[6] Make similar changes on CodeGenerator{ObjC,GObject,CPP}.pm.
Adam Barth
Sounds like a good idea.
Darin Adler
Can we change this so code is shared while doing the work 6 times?
Kentaro Hara
(In reply to comment #3)
> Can we change this so code is shared while doing the work 6 times?
Sure. I'll make UpdateFileIfChanged() in CodeGenerator.pm and use it from all CodeGenerators.
Alexey Proskuryakov
*** Bug 117708 has been marked as a duplicate of this bug. ***