Skip to content

Commit

Permalink
Update rules that require a cpp toolchain to use a helper function th…
Browse files Browse the repository at this point in the history
…at defines the toolchain type. (#3401)
  • Loading branch information
katre authored Jun 22, 2022
1 parent b816424 commit 2645f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bazel/p4_library.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""P4 compilation rule."""

load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")

def _extract_common_p4c_args(ctx):
"""Extract common arguments for p4c build rules."""
Expand Down Expand Up @@ -152,7 +152,7 @@ p4_library = rule(
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
},
incompatible_use_toolchain_transition = True,
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
toolchains = use_cpp_toolchain(),
)

def _p4_graphs_impl(ctx):
Expand Down

0 comments on commit 2645f65

Please sign in to comment.