 +    tcs_num = "12",
 +    tcs_policy = "0",
 +    visibility = ["//visibility:public"],
-+)
-+
-+# A wrapping library that wraps linux_sgx targets used by enclave.
-+cc_library(
-+    name = "intel_runtime",
-+    tags = [
-+        "manual",
-+    ],
-+    visibility = ["//visibility:public"],
-+    deps = [
-+        ":common_inc",
-+        ":sgx_spin_lock",
-+        ":sgx_tcrypto",
-+        ":sgx_tthread",
-+        ":trts",
-+        ":trusted_inc",
-+    ],
 +)
 +
 +cc_library(

+
+    # Append enclave specific arguments.
+    kwargs["copts"] = kwargs.get("copts", []) + ["-fstack-protector"]
+
+    lds_label = "@linux_sgx//:enclave_sim.lds"
+    kwargs["features"] = kwargs.get("features", []) + [
+        "fully_static_link",
+    ]

+        "compilation_mode": "dbg",
+    },
+    visibility = ["//visibility:public"],
+)
+
+enclave_lds(
+    name = "enclave_lds",
+    debug = select({
+        ":dbg": True,
+        "//conditions:default": False,
+    }),
+    simulation = select({
+        ":sgx_sim": True,
+        "//conditions:default": False,
+    }),
+    visibility = [
+        "//visibility:public",
+    ],
+)
+
+sgx.full_enclave_configuration(
