 +        **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]

+        ),
+    }
+    return rule(
+        implementation = _sgx_signed_enclave_impl,
+        executable = True,
+        doc = "Creates a signed enclave binary using a signature file.",
+        attrs = backend_tools.merge_dicts(attrs, _transition_dict if transition else {}),

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")
