Add flags to cc_shared_library for easier debugging

--//examples:incompatible_link_once=False[default = False]
When True, it will be an error to link the same library more than once
unless it has the tag LINKABLE_MORE_THAN_ONCE

--//examples:experimental_debug=True[default = False]
When True, it will generate files listing the exports of each cc_shared_library
and which libraries are linked to it statically.

RELNOTES:none
PiperOrigin-RevId: 311323625
Change-Id: I340cc71965650f7c9dd7ef7fb9656da362021527
diff --git a/examples/BUILD b/examples/BUILD
index d9178c1..0bfcd24 100644
--- a/examples/BUILD
+++ b/examples/BUILD
@@ -12,5 +12,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
 # A collection of examples showing the usage of rules_cc
 licenses(["notice"])
+
+bool_flag(
+    name = "incompatible_link_once",
+    build_setting_default = False,
+    visibility = ["//visibility:public"],
+)
+
+bool_flag(
+    name = "experimental_debug",
+    build_setting_default = False,
+    visibility = ["//visibility:public"],
+)