blob: 321c65cdca7214c3daaed32c21914c60b7d83af4 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
zx_library("ftl") {
sdk = "source"
sdk_headers = [
"lib/ftl/ndm-driver.h",
"lib/ftl/volume.h",
]
host = true
sources = [
"ftl.h",
"ftl_private.h",
"ftln/ftln_init.c",
"ftln/ftln_intrnl.c",
"ftln/ftln_rd.c",
"ftln/ftln_util.c",
"ftln/ftlnp.h",
"ftln/ndm-driver.cc",
"ftln/volume.cc",
"inc/kprivate/fsdriver.h",
"inc/kprivate/fsprivate.h",
"inc/kprivate/ndm.h",
"inc/config.h",
"inc/posix.h",
"inc/sys.h",
"inc/targetos.h",
"ndm/ndm_init.c",
"ndm/ndm_intrnl.c",
"ndm/ndm_vols.c",
"ndm/ndmp.h",
"utils/aalloc.c",
"utils/bsp.h",
"utils/crc32_tbl.c",
"utils/fsmem.c",
"utils/fsys.c",
"utils/fsysinit.c",
"utils/ftl_mc.c",
"utils/ftl_mc.h",
"utils/kernel.h",
"utils/sys.c",
]
include_dirs = [ "." ]
deps = [
"$zx/system/ulib/backtrace-request",
"$zx/system/ulib/fbl",
"$zx/system/ulib/fdio",
]
if (is_fuchsia) {
sources += [ "utils/semaphore.cc" ]
deps += [ "$zx/system/ulib/zircon" ]
} else {
sources += [ "utils/semaphore_posix.cc" ]
deps += [ "$zx/system/ulib/zircon:headers" ]
}
configs += [ ":config" ]
# TODO(41889): 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 +=
[ "$zx_build/public/gn/config:temporarily_disable_ubsan_do_not_use" ]
}
config("config") {
visibility = [ ":*" ]
defines = [ "NDM_DEBUG" ]
include_dirs = [ "." ]
}
zx_test("ftl_test") {
output_name = "ftl-lib-test"
sources = [
"test/ndm_driver_test.cc",
"test/ndm_test.cc",
]
deps = [
":ftl",
"$zx/system/ulib/zxtest",
]
configs += [ ":config" ]
}
group("test") {
testonly = true
deps = [ ":ftl_test" ]
}