Skip to content
Merged
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
15 changes: 11 additions & 4 deletions cc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Had a look at the rest of the file, and it seems swift_c_test might also be missing the standard option? swift_cc_test uses it.

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)
cxxopts = _common_cxx_standard_opts(standard)

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

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

Expand Down Expand Up @@ -648,7 +652,10 @@ def swift_c_test(name, type, **kwargs):

local_includes = _construct_local_includes(kwargs.pop("local_includes", []))

kwargs["copts"] = local_includes + kwargs.get("copts", []) + _tests_warn_deprecated_declarations()
extensions = kwargs.pop("extensions", False)
standard = kwargs.pop("standard", 99)

kwargs["copts"] = local_includes + kwargs.get("copts", []) + _tests_warn_deprecated_declarations() + _c_standard(extensions, standard)
kwargs["data"] = kwargs.get("data", []) + _symbolizer_data()
kwargs["env"] = _symbolizer_env(kwargs.get("env", {}))
kwargs["linkstatic"] = kwargs.get("linkstatic", True)
Expand Down