[bazel] Add dual_cc_library for cross-platform C libs

dual_cc_library is a macro that is like cc_library, but whose inputs
depend on the build mode. This allows using one dependency for normal
and mock versions that is automatically selected.

Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
diff --git a/rules/BUILD b/rules/BUILD
index f29bca3..ca0e934 100644
--- a/rules/BUILD
+++ b/rules/BUILD
@@ -2,4 +2,11 @@
 # Licensed under the Apache License, Version 2.0, see LICENSE for details.
 # SPDX-License-Identifier: Apache-2.0
 
+load("//rules:opentitan.bzl", "OPENTITAN_PLATFORM")
+
 package(default_visibility = ["//visibility:public"])
+
+config_setting(
+    name = "opentitan_platform",
+    values = {"platforms": OPENTITAN_PLATFORM},
+)