-
Couldn't load subscription status.
- Fork 139
Only build objects when supports_start_end_lib is enabled #493
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
base: main
Are you sure you want to change the base?
Only build objects when supports_start_end_lib is enabled #493
Conversation
| if supports_start_end_lib and (artifacts_to_build.objects or artifacts_to_build.pic_objects): | ||
| if artifacts_to_build.pic_objects: | ||
| files_builder.extend(artifacts_to_build.pic_objects) | ||
| elif artifacts_to_build.objects: |
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.
Previously both the pic and non-pic version were built, now only one of the two flavors is requested. There are pros and cons to both approaches, I guess. We should at least leave a comment explaining why this differs between the two feature states.
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 was wondering why that was the case, or in what configurations you would end up with both, but I can play it safe and mirror today's behavior 🤔 , not sure what the ideal is?
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 would say it's safer if there are fewer outputs (assuming we change the type of outputs anyway) as this results in fewer downloads with default BwoB settings and smaller BES messages. Building pic of available and non-pic only as a fallback seems reasonable to me. I wouldn't expect non-pic compilation to fail if pic compilation passes.
| files_builder.extend(artifacts_to_build.objects) | ||
| else: | ||
| if artifacts_to_build.static_library != None: | ||
| files_builder.append(artifacts_to_build.static_library) |
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.
We could advertise new static_library and pic_static_library output groups so that users can still get these artifacts.
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.
added that for discussion, seems fine
| files_builder.append(artifacts_to_build.static_library) | ||
| if supports_start_end_lib and (artifacts_to_build.objects or artifacts_to_build.pic_objects): | ||
| if artifacts_to_build.pic_objects: | ||
| files_builder.extend(artifacts_to_build.pic_objects) |
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.
BES messages can get larger as they no longer announce just a constant number of outputs per cc_library. Just something to keep in mind, but I think that the change is still worth it.
Fixes #419