Skip to content

Test update swift_cc_test_library [AP-3450] #153

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions cc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,15 @@ def swift_cc_test_library(**kwargs):
be relative to the package this macro is called from.
"""

_ = kwargs.pop("nocopts", []) # To handle API compatibility.

nocopts = kwargs.pop("nocopts", []) # pop because nocopts is a deprecated cc* attr.
local_includes = _construct_local_includes(kwargs.pop("local_includes", []))

kwargs["copts"] = local_includes + kwargs.get("copts", [])
standard = kwargs.pop("standard", None)

copts = _common_cc_opts(nocopts, pedantic = False)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pedantic = False is important, this is a test library

cxxopts = _common_cxx_standard_opts(standard)

kwargs["copts"] = copts + cxxopts + local_includes + kwargs.get("copts", [])

kwargs["tags"] = [TEST_LIBRARY] + kwargs.get("tags", [])

Expand Down
Loading