-
Notifications
You must be signed in to change notification settings - Fork 653
[bazel] Create better static libraries and add basic packaging for eventual publishing. #8029
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: 2027
Are you sure you want to change the base?
[bazel] Create better static libraries and add basic packaging for eventual publishing. #8029
Conversation
linker_inputs = [] | ||
for linker_input in dependency_linker_inputs: | ||
for lib in linker_input.libraries: | ||
for o in lib.objects + lib.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.
FYI, with -c opt on Linux, I think this needs to be one or the other. I've seen both populated. Happy to be wrong if you've dug deeper and know what I saw.
output_file = ctx.actions.declare_file(ctx.attr.static_lib_name) | ||
else: | ||
folder, lib = _folder_prefix(ctx.label.name) | ||
output_file = ctx.actions.declare_file(folder + "/lib" + lib + ".a") |
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.
Mind putting a TODO here on .lib vs .a?
feature_configuration = cc_common.configure_features( | ||
ctx = ctx, | ||
cc_toolchain = cc_toolchain, | ||
requested_features = ctx.features + ["force_no_whole_archive"], |
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.
Mind a quick comment on what force_no_whole_archive does for us here?
I'm happy with TODOs for some of these things too. I mostly don't want to lose the open threads. Thanks for doing this! |
This is a watered down version of a combo of #8025 and #7971. Austins PR will have some work to do to get it working on windows, and my publishing PR should be superseded by his (unpublished) work with the
rules_jvm_external
.Since a large portion of his PR is library renames for easier publishing, and adding the smarter static libraries, this rips out just those relevant bits while the windows shared library problem can be worked on. separately