-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent full rebuilds on Kconfig changes #4951
Comments
kbuild had a clever system for enabling this. as I recall, it would create a directory structure for the kconfig space with separate files for each config option, in $OUT/include/config. |
This will not work with Kconfiglib, due to the fact that it does not generate this tree in |
Until this is resolved I would recommend users that often modify Kconfig in their edit-build-debug cycle to ensure ccache is installed. Otherwise the performance will make the system unusable. |
@andrewboie The way it works is that an empty file is stored in There also a tool called It shouldn't be that hard to add the functionality to Kconfiglib, though it requires a bit of work (would need to keep track of the |
Don't know if |
Would take less work than I first thought. Could just dump all the current symbol values (e.g. after loading Think it should be pretty trivial now, so I'm happy. Just the |
Was a bit trickier than I anticipated (the devil is in the details), but it's implemented now, using the same scheme as the C tools: ulfalizer/Kconfiglib@378dedc |
@ulfalizer thanks a lot for this! I will rebase to the latest Kconfiglib after the release and we'll see how we can integrate this with CMake. |
Update kconfiglib to revision fd21c5cb320b9 which can be found at https://github.com/SebastianBoe/Kconfiglib This allows us to eventually resolve some outstanding Kconfig issues such as zephyrproject-rtos#4951 Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Update kconfiglib to revision fd21c5cb320b9 which can be found at https://github.com/SebastianBoe/Kconfiglib This allows us to eventually resolve some outstanding Kconfig issues such as #4951 Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
re-assigning to me for now, AFAICT the Kconfig part of this is done, and this is now a build-system task. |
@ulfalizer is this addressed? Can we address it if not? |
@carlescufi See the docstring at https://github.com/ulfalizer/Kconfiglib/blob/673f771d2f333b5688d680eba5949f98f12c6177/kconfiglib.py#L1163 for an overview. The tool that extracts dependencies from source files in the Linux kernel is called |
To implement this one would need to: Add -MD to the compile_options to have gcc spit out which header Remove CMake's autodetected dependency on autoconf.h, which I Run a script on each 'gcc -MD' generated dep file to detect which In practice this will be difficult to implement and should |
@SebastianBoe @ulfalizer did we ever come to a conclusion on this issue? |
@SebastianBoe See fixdep.c and the docstring for |
That is interesting. But we can't use fixdep.c because users are not required to have a host C compiler and we don't want to distribute it ourselves. |
There is no way of solving this problem without introducing more complexity than the solution is worth. So I am closing this as can't-fix. If someone can figure out a reasonable way to solve this then feel free to comment. |
With Kbuild, a Kconfig change would result in an incremental build. After the CMake migration we get a full rebuild.
Find out if the new performance is acceptable and/or if there exists any low-hanging fruit optimizations that we can take from Kbuild and re-implement in CMake.
The text was updated successfully, but these errors were encountered: