 +        **kwargs
 +    )
 +
-+def _sgx_signed_enclave_impl(ctx):
++def _sgx_signed_enclave_impl_helper(ctx, transition):
 +    """Implementation of incorporating a signature into an enclave binary."""
-+    config = ctx.attr.signing_material[SGXSigstructInfo].config
-+    unsigned = ctx.attr.signing_material[SGXSigstructInfo].unsigned
++    signing_material = ctx.attr.signing_material[0] if transition else ctx.attr.signing_material
++    config = signing_material[SGXSigstructInfo].config
++    unsigned = signing_material[SGXSigstructInfo].unsigned
 +    if SGXEnclaveInfo not in unsigned:
 +        fail("Unsigned enclave referenced in config does not have SGXEnclaveInfo provider")
 +    unsigned_file = unsigned.files.to_list()[0]

+        SGXEnclaveInfo(),
+    ]
+
+# Skylark rule for the above implementation.
+def _make_sgx_signing_rule(transition):
+    attrs = {

diff -Nur /dev/null sgx_sdk.bzl
--- /dev/null
+++ sgx_sdk.bzl
@@ -0,0 +1,997 @@
+"""Build tools for supporting Intel's SDK."""
+
+load("@com_google_asylo_backend_provider//:enclave_info.bzl", "backend_tools")
