Add user archiver flags into C++ toolchains
Closes: #22861.
how are these set? I don't see user_archiver_flags referenced anywhere else?
@keith, I can use it by calling create_linking_context_from_compilation_outputs with the variables_extension argument. Code will looks like:
(linking_context, linking_outputs) = cc_common.create_linking_context_from_compilation_outputs(
name = output_name,
actions = ctx.actions,
feature_configuration = feature_configuration,
cc_toolchain = cc_toolchain,
language = "c++",
compilation_outputs = compilation_outputs,
linking_contexts = [compilation_cc_info.linking_context],
disallow_dynamic_library = True,
variables_extension = {
"user_archiver_flags": user_link_flags
},
)
ah cool. I think the google folks will have to look at this. they might ask for a test here, or a general way for folks to pass this who aren't calling that function directly
@keith, do we wait for someone else to review this PR?
Yea probably @pzembrod
@pzembrod, can you take a look at the PR?