Add default value for _default_copts in cc_binary.
@@ -19,6 +19,7 @@ load(":common/cc/semantics.bzl", "semantics")
load(":common/cc/experimental_cc_shared_library.bzl", "CcSharedLibraryInfo", "graph_structure_aspect")
CcInfo = _builtins.toplevel.CcInfo
+cc_internal = _builtins.internal.cc_internal
cc_binary_attrs_with_aspects = {
"srcs": attr.label_list(
@@ -89,8 +90,7 @@ cc_binary_attrs_with_aspects = {
"_stl": semantics.get_stl(),
"_cc_toolchain": attr.label(default = "@" + semantics.get_repo() + "//tools/cpp:current_cc_toolchain"),
"_cc_toolchain_type": attr.label(default = "@" + semantics.get_repo() + "//tools/cpp:toolchain_type"),
- # TODO(b/198254254): Add default computed value once it is available in the API.
- "_default_copts": attr.string_list(),
+ "_default_copts": attr.string_list(default = cc_internal.default_copts_computed_default()),
"_def_parser": semantics.get_def_parser(),
}
