blob: 51a9f481e7f90429360c9f1d9061a3bbaad96375 [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.
##########################################
# 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")
# This library requires an environment with mtd/mtd-user.h and MTD support.
zx_library("mtd") {
sdk = "source"
sdk_headers = [
"lib/mtd/mtd-interface.h",
"lib/mtd/nand-interface.h",
]
host = true
sources = []
if (current_os == "linux") {
sources += [ "mtd-interface.cc" ]
}
public_deps = [ "//zircon/public/lib/fbl" ]
deps = [
"//zircon/public/lib/fbl",
"//zircon/public/lib/log",
]
defines = []
if (current_cpu == "arm64") {
defines += [ "SPARE_SIZE=8" ]
} else {
defines += [ "MEMWRITE_NOT_SUPPORTED" ]
}
}