-
Notifications
You must be signed in to change notification settings - Fork 698
Description
🐛 Describe the bug
Issue:
So when building executorch, when running ninja/make, the rebuild builds more than required, this annoys me.
Specifically:
- The first time call ninja-> builds everything, yay.
- immediately call ninja again -> rebuilds 2 files.
- immediately call ninja again -> rebuilds 12 files.
(repeats 2-3 ad nauseum)
Cause:
This is caused by when cmake sets up the generation of the schema headers. It generates the file: include/executorch/schema/program_generated.h
However, it expects to generate:
include/executorch/program_generated.h
When ninja/make goes to check for the file: 'include/executorch/program_generated.h' it does not exist, so it regenerates the
file 'include/executorch/schema/program_generated.h'.
Then the next time CMake is run, ninja sees that program_generated.h has been updated, so it regenerates the 12 other dependent files.
Fix (In associated pull request)
Tell CMake to look for the files that it actually generated.
Possible drawbacks?
So this looks like someone updated the include directory for the schema headers to be in the schema subdirectory, and forgot/did not know to update the CMake dependency tracking. However, if this change occurred, it happened before the open source git history.
I suppose that it is possible that there is some weird edge-case that requires that the schema headers are always regenerated...
Metadata
Metadata
Assignees
Labels
Type
Projects
Status