Skip to content
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

Add user archiver flags into C++ toolchains #22862

Closed
wants to merge 3 commits into from

Conversation

Fil-Den
Copy link
Contributor

@Fil-Den Fil-Den commented Jun 23, 2024

Closes: #22861.

@github-actions github-actions bot added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jun 23, 2024
@keith
Copy link
Member

keith commented Jun 23, 2024

how are these set? I don't see user_archiver_flags referenced anywhere else?

@Fil-Den
Copy link
Contributor Author

Fil-Den commented Jun 24, 2024

@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
    },
)

@keith
Copy link
Member

keith commented Jun 24, 2024

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

@Fil-Den
Copy link
Contributor Author

Fil-Den commented Jun 26, 2024

@keith, do we wait for someone else to review this PR?

@keith
Copy link
Member

keith commented Jun 26, 2024

Yea probably @pzembrod

@Fil-Den
Copy link
Contributor Author

Fil-Den commented Jul 4, 2024

@pzembrod, can you take a look at the PR?

@comius comius added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Sep 23, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C++] Custom user flags to archiver call
3 participants