-
Notifications
You must be signed in to change notification settings - Fork 19.7k
build: improved build speed with ccache #8696
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
Conversation
libraries/AP_GPS/AP_GPS.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does increase the build size for minimized boards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I don't think it does (as its a union)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked, it does change the build size here, and this is not a union, it's a struct. (Each driver type needs it's own detect state))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the HAL_MINIMIZE_FEATURES check:
BUILD SUMMARY
Build directory: /home/wickedshell/code/ardupilot/build/fmuv2
Target Text Data BSS Total
--------------------------------------------
bin/arduplane 952124 3960 193284 1149368
Without the HAL_MINIMIZE_FEATURES check:
BUILD SUMMARY
Build directory: /home/wickedshell/code/ardupilot/build/fmuv2
Target Text Data BSS Total
--------------------------------------------
bin/arduplane 952172 3960 193284 1149416
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry about that, of course its a struct
now, the Q is if 50 bytes is worth it ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other option is to just move the detect state into AP_GPS.cpp as a static struct (or static member of AP_GPS::detect_instance()) which would allow the maintenance of the HAL_MINIMIZE_FEATURES check, without polluting the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make builds already don't fit for PX4-FMUv2, so we're probably approaching it too with waf builds.
930bd0e to
555f302
Compare
making this header equal improves speed of fmuv2 build after fmuv3 build with ccache, without affecting binary
this is considerably faster than the way dependency system
555f302 to
b80a869
Compare
|
LGTM, except the change to waf: doesn't that mean that some dependencies won't be accounted for? |
|
@OXINARF yes, it basically means the PX4 ORB generated headers are considered like system headers, and aren't considered for dependencies. Given those ORB msgs haven't changed for many months I don't think its an issue |
|
merged after discussion with @WickedShell and @peterbarker |
|
@OXINARF I've added a DevCallTopic tag for further discussion |
This improves build speed for the common case of:
rm -rf build; ./waf configure --board fmuv3; ./waf plane
this PR changes us from the builtin c_preproc depenency checker in waf to the gcc based -MD system (using .d files). That reduces the time for the above build with ccache from 90 seconds to 9 seconds
It is also faster with no ccache. On my machine rover build drops from 3:25 to 2:47