      visibility = ["//visibility:public"],
      deps = [":protobuf_lite"] + PROTOBUF_DEPS,
  )
+@@ -255,13 +258,15 @@ filegroup(
+     visibility = ["//visibility:public"],
+ )
+ 
+-cc_proto_library(
++adapt_proto_library(
++    name = "cc_wkt_protos_genproto",
++    deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
++    visibility = ["//visibility:public"],
++)
++
++cc_library(
+     name = "cc_wkt_protos",
+-    srcs = WELL_KNOWN_PROTOS,
+-    include = "src",
+-    default_runtime = ":protobuf",
+-    internal_bootstrap_hack = 1,
+-    protoc = ":protoc",
++    deprecation = "Only for backward compatibility. Do not use.",
+     visibility = ["//visibility:public"],
+ )
+ 
+@@ -978,10 +983,10 @@ cc_library(
+ 
+ proto_lang_toolchain(
+     name = "cc_toolchain",
++    blacklisted_protos = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
+     command_line = "--cpp_out=$(OUT)",
+     runtime = ":protobuf",
+     visibility = ["//visibility:public"],
+-    blacklisted_protos = [":_internal_wkt_protos_genrule"],
+ )
+ 
+ proto_lang_toolchain(
 diff --git a/protobuf.bzl b/protobuf.bzl
-index e065332..92ae3b4 100644
+index e0653321f..4156a1275 100644
 --- a/protobuf.bzl
 +++ b/protobuf.bzl
-@@ -85,6 +85,8 @@ def _proto_gen_impl(ctx):
+@@ -1,4 +1,5 @@
+ load("@bazel_skylib//lib:versions.bzl", "versions")
++load("@rules_proto//proto:defs.bzl", "ProtoInfo")
+ 
+ def _GetPath(ctx, path):
+     if ctx.label.workspace_root:
+@@ -85,6 +86,8 @@ def _proto_gen_impl(ctx):
      for dep in ctx.attr.deps:
          import_flags += dep.proto.import_flags
          deps += dep.proto.deps

     visibility = ["//visibility:public"],
 )
 
@@ -213,6 +214,7 @@ cc_library(
     copts = COPTS,
     includes = ["src/"],
     linkopts = LINK_OPTS,

 
 ################################################################################
 # Protobuf Runtime Library
@@ -100,6 +100,7 @@ LINK_OPTS = select({
 
 load(
     ":protobuf.bzl",
+    "adapt_proto_library",
     "cc_proto_library",
     "py_proto_library",
     "internal_copied_filegroup",
@@ -143,6 +144,7 @@ cc_library(
     copts = COPTS,
     includes = ["src/"],
     linkopts = LINK_OPTS,
