[unification] Move //zircon/system/ulib/blktest to the GN build
Affected libraries:
//zircon/system/ulib/blktest
scripts/unification/verify_element_move.py --reference local/initial.json:
Error aux element removed: lib/asan-ubsan/libblktest.so
Error aux element removed: lib/ubsan-sancov-full/libblktest.so
Error aux element removed: lib/ubsan/libblktest.so
Error aux element removed: lib/profile/libblktest.so
Error aux element removed: lib/libblktest.so
Error aux element removed: lib/asan/libblktest.so
Error aux element removed: lib/sancov/libblktest.so
Error aux element removed: lib/ubsan-sancov/libblktest.so
Error image size change for lib/libblktest.so: +6% (93.5K)
Error: summaries do not match!
Generated with //scripts/unification/move_cpp_library.py
Bug: 36548
Change-Id: I432c8cecafc93cd65e8996c5117f4f9ec4086bfe
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/378135
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
Commit-Queue: Theodore Dubois <tbodt@google.com>
diff --git a/build/unification/images/BUILD.gn b/build/unification/images/BUILD.gn
index 9b8594d..18eabe11 100644
--- a/build/unification/images/BUILD.gn
+++ b/build/unification/images/BUILD.gn
@@ -617,7 +617,6 @@
"backtrace",
#------------------
#------------------
- "blktest",
#------------------
#------------------
"devmgr-integration-test",
diff --git a/src/devices/block/bin/blktest/BUILD.gn b/src/devices/block/bin/blktest/BUILD.gn
index 34a431f..eac3c22 100644
--- a/src/devices/block/bin/blktest/BUILD.gn
+++ b/src/devices/block/bin/blktest/BUILD.gn
@@ -18,13 +18,14 @@
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
+
# Dependent manifests unfortunately cannot be marked as `testonly`.
# TODO(44278): Remove when converting this file to proper GN build idioms.
testonly = false
sources = [ "main.c" ]
deps = [
- "//zircon/public/lib/blktest",
"//zircon/public/lib/unittest",
+ "//zircon/system/ulib/blktest",
]
}
diff --git a/zircon/system/ulib/BUILD.gn b/zircon/system/ulib/BUILD.gn
index c281073..2660f96 100644
--- a/zircon/system/ulib/BUILD.gn
+++ b/zircon/system/ulib/BUILD.gn
@@ -68,7 +68,6 @@
"bitmap",
#------------------
#------------------
- "blktest",
#------------------
#------------------
"blobfs",
diff --git a/zircon/system/ulib/blktest/BUILD.gn b/zircon/system/ulib/blktest/BUILD.gn
index 0203ab3..25826be 100644
--- a/zircon/system/ulib/blktest/BUILD.gn
+++ b/zircon/system/ulib/blktest/BUILD.gn
@@ -2,6 +2,18 @@
# 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("blktest") {
sdk = "shared"
sdk_headers = [ "blktest/blktest.h" ]
@@ -9,17 +21,16 @@
testonly = true
sources = [ "blktest.cc" ]
deps = [
- "$zx/system/fidl/fuchsia-hardware-block:c",
- "$zx/system/ulib/block-client",
- "$zx/system/ulib/fbl",
- "$zx/system/ulib/fdio",
- "$zx/system/ulib/fdio-caller",
- "$zx/system/ulib/fzl",
- "$zx/system/ulib/pretty",
- "$zx/system/ulib/sync",
- "$zx/system/ulib/unittest",
- "$zx/system/ulib/zircon",
- "$zx/system/ulib/zx",
+ "//zircon/public/lib/block-client",
+ "//zircon/public/lib/fbl",
+ "//zircon/public/lib/fdio",
+ "//zircon/public/lib/fdio-caller",
+ "//zircon/public/lib/fzl",
+ "//zircon/public/lib/pretty",
+ "//zircon/public/lib/sync",
+ "//zircon/public/lib/unittest",
+ "//zircon/public/lib/zx",
+ "//zircon/system/fidl/fuchsia-hardware-block:c",
]
- configs += [ "$zx_build/public/gn/config:static-libc++" ]
+ configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}