 +)
 --- /dev/null
 +++ sgx_sdk.bzl
-@@ -0,0 +1,583 @@
+@@ -0,0 +1,590 @@
 +"""Build tools for supporting Intel's SDK."""
 +
 +load("@com_google_asylo_backend_provider//:enclave_info.bzl", "EnclaveInfo")

+
+def _sgx_debug_enclave_impl(ctx):
+    """Implementation of an automated signing process of an unsigned enclave."""
+    ctx.actions.run(
+        inputs = [
+            ctx.file.unsigned,
+            ctx.file._key,
+            ctx.file.config,
+        ],
+        executable = ctx.executable._sign_tool,
+        outputs = [ctx.outputs.executable],
+        progress_message = "Signing for debug: //{pkg}:{name}".format(
+            pkg = ctx.attr.unsigned.label.package,
+            name = ctx.attr.unsigned.label.name,
+        ),
+        arguments = [
+            "sign",
+            "-enclave",

+            ctx.file.sigstruct,
+            unsigned_file,
+        ],
+        tools = [ctx.executable._sign_tool],
+        outputs = [ctx.outputs.executable],
+        progress_message = "Integrating signature into: //{pkg}:{name}".format(
+            pkg = unsigned.label.package,
+            name = unsigned.label.name,
+        ),
+        command = "output=`%s $@ 2>&1` || echo $output" %
+                  ctx.executable._sign_tool.path,
+        arguments = [
+            "catsig",
+            "-enclave",
