[unification] Move //zircon/system/ulib/debugdata to the GN build

Affected libraries:
//zircon/system/ulib/debugdata

Generated with //scripts/unification/move_cpp_library.py

Bug: 36548
Change-Id: I9eee8204fe27f540081224bdfd8d6698fe700149
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/377800
Commit-Queue: Theodore Dubois <tbodt@google.com>
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
diff --git a/zircon/system/ulib/BUILD.gn b/zircon/system/ulib/BUILD.gn
index 8b82330..d7432a7 100644
--- a/zircon/system/ulib/BUILD.gn
+++ b/zircon/system/ulib/BUILD.gn
@@ -116,7 +116,6 @@
     "ddktl",
 #------------------
 #------------------
-    "debugdata",
 #------------------
 #------------------
     "devmgr-integration-test",
diff --git a/zircon/system/ulib/debugdata/BUILD.gn b/zircon/system/ulib/debugdata/BUILD.gn
index b523cfc..f3003ff 100644
--- a/zircon/system/ulib/debugdata/BUILD.gn
+++ b/zircon/system/ulib/debugdata/BUILD.gn
@@ -2,32 +2,43 @@
 # 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("debugdata") {
   sources = [ "debugdata.cc" ]
   sdk = "source"
   sdk_headers = [ "lib/debugdata/debugdata.h" ]
   deps = [
-    "$zx/system/fidl/fuchsia-debugdata:llcpp",
-    "$zx/system/ulib/async:async-cpp",
-    "$zx/system/ulib/async-loop:async-loop-cpp",
-    "$zx/system/ulib/async-loop:async-loop-default.static",
-    "$zx/system/ulib/fbl",
-    "$zx/system/ulib/fidl",
-    "$zx/system/ulib/fs",
-    "$zx/system/ulib/zircon",
-    "$zx/system/ulib/zx",
+    "//zircon/public/lib/async-cpp",
+    "//zircon/public/lib/async-loop-cpp",
+    "//zircon/public/lib/async-loop-default",
+    "//zircon/public/lib/fbl",
+    "//zircon/public/lib/fidl",
+    "//zircon/public/lib/fs",
+    "//zircon/public/lib/zx",
+    "//zircon/system/fidl/fuchsia-debugdata:llcpp",
   ]
   public_deps = [
     # <debugdata/debugdata.h has #include <fuchsia/debugdata/llcpp/fidl.h>.
-    "$zx/system/fidl/fuchsia-debugdata:llcpp.headers",
+    "//zircon/system/fidl/fuchsia-debugdata:llcpp",
 
     # <debugdata/debugdata.h> has #include <fbl/unique_fd.h>.
-    "$zx/system/ulib/fbl:headers",
+    "//zircon/public/lib/fbl",
 
     # <debugdata/debugdata.h> has #include <lib/async/cpp/wait.h>.
-    "$zx/system/ulib/async:async-cpp.headers",
+    "//zircon/public/lib/async-cpp",
 
     # <debugdata/debugdata.h> has #include <lib/zircon-internal/fnv1hash.h>.
-    "$zx/system/ulib/zircon-internal:headers",
+    "//zircon/public/lib/zircon-internal",
   ]
 }
diff --git a/zircon/system/ulib/debugdata/test/BUILD.gn b/zircon/system/ulib/debugdata/test/BUILD.gn
index 2e15331..d1158a8 100644
--- a/zircon/system/ulib/debugdata/test/BUILD.gn
+++ b/zircon/system/ulib/debugdata/test/BUILD.gn
@@ -28,11 +28,11 @@
   deps = [
     "//zircon/public/lib/async-loop-cpp",
     "//zircon/public/lib/async-loop-default",
-    "//zircon/public/lib/debugdata",
     "//zircon/public/lib/fidl-async-cpp",
     "//zircon/public/lib/fs",
     "//zircon/public/lib/zx",
     "//zircon/public/lib/zxtest",
+    "//zircon/system/ulib/debugdata",
   ]
 }
 
diff --git a/zircon/system/ulib/runtests-utils/BUILD.gn b/zircon/system/ulib/runtests-utils/BUILD.gn
index 46dd489..64588e0a 100644
--- a/zircon/system/ulib/runtests-utils/BUILD.gn
+++ b/zircon/system/ulib/runtests-utils/BUILD.gn
@@ -63,7 +63,6 @@
       "//zircon/public/lib/async-loop",
       "//zircon/public/lib/async-loop-cpp",
       "//zircon/public/lib/async-loop-default",
-      "//zircon/public/lib/debugdata",
       "//zircon/public/lib/fdio",
       "//zircon/public/lib/fidl",
       "//zircon/public/lib/fidl-async-cpp",
@@ -73,6 +72,7 @@
       "//zircon/public/lib/zx",
       "//zircon/system/fidl/fuchsia-io:llcpp",
       "//zircon/system/fidl/fuchsia-logger:c",
+      "//zircon/system/ulib/debugdata",
       "//zircon/system/ulib/loader-service",
     ]
     if (false) {  # is_gcc