-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Makefile.base: cleanup non selected source object files #16945
Makefile.base: cleanup non selected source object files #16945
Conversation
I tested that this fixes the issue for me. |
I was trying to see if there was another way of doing this where instead of cleaning unused object files we would specify the want to use, but this information is AFAIK not easy to obtain when we are linking. Nonetheless, I'm under the impression that with this change building |
What about now? |
Still seem to increase in about 13%, but well I guess there is bound to be an increase... |
As discussed offline, I now avoid calling |
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.
Looks good!
Please squash @leandrolanzieri! |
@leandrolanzieri please trigger the ci after squashing! |
92130d8
to
5bcd138
Compare
LGTM to me as well, quite elegant actually! |
Looks good; I didn't test, but it ticks all other boxes. |
please squash! |
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.
ACK.
0009c32
to
452333c
Compare
Release managers since #14754 was merged (@bergzand @jia200x @kaspar030 @MrKevinWeiss): how far do you think this should be backported? |
IMO it should only be backported to the last release. We usually don't provide LTS |
yup, or maybe not even that. this basically fixes an inconvenience. it is also non-intrusive, so merging it before the next RC wouldn't hurt. |
I guess that is me then 🦸 |
does this work for non pseudo modules? i see - it does not need to delete object of not used modules since they are just not added to the obj list |
Nonpseudomodules are ignored from linking in another stage here: Lines 669 to 674 in e804a73
MODULES that are not selected would not be in BASELIBS, the issues is that we here linking everything under MODULE/ with the wildcard, see: Lines 11 to 14 in e804a73
And conditional SRC selection is always based on PSEUDOMODULES or SUBMODULES (which are the same), or in some cases on |
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.
ACK and GO!
Thanks for reviewing ! |
Backport provided in #16953 |
Were we backporting to the 07 release too or just the 10? |
Contribution description
As explained in #16942, since #14754 we select all object files when linking, which is a problem when the selection of module sources change between two builds. This adds a cleanup for non selected source object files on modules.
Testing procedure
A minimal example that shows the current issue:
Compile once with
USEMODULE += external_module_implementation_a
and once withUSEMODULE += external_module_implementation_b
,message_implementation
will have two implementations at link time on master. With this PR this should be fixed.Issues/PRs references
#16942
Issue introduced by #14754