[build][alln] Fix zircon library dependency

This CL relies on [1] being submitted first to fuchsia.git.
It updates library references to libzircon.so to the appropriate
target, to allow moving the sysroot generation to the Fuchsia
build. See [1] for more details.

Bug: 60613
Testing: Should not change the build.

[1] https://fuchsia-review.googlesource.com/c/fuchsia/+/433557

Change-Id: I7b3deabe5b7238070996c52fe774ba4a0042269b
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/boringssl/+/434760
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
Commit-Queue: David Turner <digit@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index c077254..9606750 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -56,6 +56,9 @@
     # worse, impacting pave and boot times on debug builds (fxb/55456)
     configs -= [ "//build/config:default_optimize" ]
     configs += [ "//build/config:optimize_speed" ]
+
+    # sysrand() uses Zircon system call.
+    deps = [ "//src/zircon/lib/zircon" ]
   }
 }
 
@@ -85,6 +88,9 @@
     # TODO(46910): UBSan has found an instance of undefined behavior in this target.
     # Disable UBSan for this target temporarily until it is migrated into CI/CQ.
     configs += [ "//build/config:temporarily_disable_ubsan_do_not_use" ]
+
+    # sysrand() uses Zircon system call.
+    deps = [ "//src/zircon/lib/zircon" ]
   }
 }
 
@@ -240,10 +246,6 @@
 # Configs
 config("boringssl_config") {
   include_dirs = [ "src/include" ]
-  if (is_fuchsia) {
-    # rand_fuchsia uses a system call
-    libs = [ "zircon" ]
-  }
 }
 
 config("internal_config") {