You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
The text was updated successfully, but these errors were encountered:
cc: @dbort and @larryliu0820 as this is related to CMake build, in particular the generated files from flatbuffer compilation. As a layman this change looks reasonable, but would like to get a review from you guys. Have assigned the issue for now, but feel free to re-assign.
🐛 Describe the bug
Issue:
So when building executorch, when running ninja/make, the rebuild builds more than required, this annoys me.
Specifically:
(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...
The text was updated successfully, but these errors were encountered: