[unification] Move //zircon/system/ulib/kernel-debug to the GN build

Affected libraries:
//zircon/system/ulib/kernel-debug

Generated with //scripts/unification/move_cpp_library.py

Bug: 36548
Change-Id: I80d03e29585e59a7cd83818b72be1f8e2e5c8986
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/378139
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
Commit-Queue: Theodore Dubois <tbodt@google.com>
diff --git a/zircon/system/core/svchost/BUILD.gn b/zircon/system/core/svchost/BUILD.gn
index 4062185..e58d1bf 100644
--- a/zircon/system/core/svchost/BUILD.gn
+++ b/zircon/system/core/svchost/BUILD.gn
@@ -57,7 +57,6 @@
     "//zircon/public/lib/fdio",
     "//zircon/public/lib/fs",
     "//zircon/public/lib/kcounter",
-    "//zircon/public/lib/kernel-debug",
     "//zircon/public/lib/kernel-mexec",
     "//zircon/public/lib/logger",
     "//zircon/public/lib/profile",
@@ -82,6 +81,7 @@
     "//zircon/system/fidl/fuchsia-sysinfo:c",
     "//zircon/system/fidl/fuchsia-sysmem:c",
     "//zircon/system/fidl/fuchsia-virtualconsole:c",
+    "//zircon/system/ulib/kernel-debug",
   ]
   output_dir = "$root_out_dir/zircon-migrated"
 }
diff --git a/zircon/system/ulib/BUILD.gn b/zircon/system/ulib/BUILD.gn
index 2660f96..27c655d 100644
--- a/zircon/system/ulib/BUILD.gn
+++ b/zircon/system/ulib/BUILD.gn
@@ -287,7 +287,6 @@
     "kcounter",
 #------------------
 #------------------
-    "kernel-debug",
 #------------------
 #------------------
     "kernel-mexec",
diff --git a/zircon/system/ulib/kernel-debug/BUILD.gn b/zircon/system/ulib/kernel-debug/BUILD.gn
index 9a2db8a..b50e836 100644
--- a/zircon/system/ulib/kernel-debug/BUILD.gn
+++ b/zircon/system/ulib/kernel-debug/BUILD.gn
@@ -2,18 +2,29 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+##########################################
+# Though under //zircon, this build file #
+# is meant to be used in the Fuchsia GN  #
+# build.                                 #
+# See fxb/36548.                         #
+##########################################
+
+assert(!defined(zx) || zx != "/",
+       "This file can only be used in the Fuchsia GN build.")
+
+import("//build/unification/zx_library.gni")
+
 zx_library("kernel-debug") {
   sdk = "source"
   sdk_headers = [ "lib/kernel-debug/kernel-debug.h" ]
   sources = [ "kernel-debug.cc" ]
   deps = [
-    "$zx/system/fidl/fuchsia-kernel:c",
-    "$zx/system/ulib/async",
-    "$zx/system/ulib/fidl",
-    "$zx/system/ulib/fidl-async",
-    "$zx/system/ulib/zircon",
-    "$zx/system/ulib/zircon-internal",
-    "$zx/system/ulib/zx",
+    "//zircon/public/lib/async",
+    "//zircon/public/lib/fidl",
+    "//zircon/public/lib/fidl-async",
+    "//zircon/public/lib/zircon-internal",
+    "//zircon/public/lib/zx",
+    "//zircon/system/fidl/fuchsia-kernel:c",
   ]
-  public_deps = [ "$zx/system/ulib/svc:headers" ]
+  public_deps = [ "//zircon/public/lib/svc" ]
 }