blob: fa87a52d86e3dc8c268dc22602d6f930f8edf579 [file] [log] [blame]
# Copyright 2017 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.
import("//build/package.gni")
# The following binaries are disabled:
# "chgrp",
# "chmod",
# "chown",
# "chroot",
# "cron",
# "flock",
# "getconf",
# "kill",
# "ln",
# "logger",
# "logname",
# "mkfifo",
# "nice",
# "nohup",
# "renice",
# "setsid",
# "time",
# "uname",
# The common binaries are the ones included in many product builds by
# default.
common_binaries = [
"basename",
"cat",
"cmp",
"cut",
"date",
"dirname",
"du",
"env",
"expr",
"find",
"grep",
"head",
"hostname",
"printf",
"seq",
"sleep",
"sort",
"tail",
"tee",
"touch",
"tr",
"uniq",
"wc",
"which",
]
sbase_binaries = [
"basename",
"cal",
"cat",
"cksum",
"cmp",
"cols",
"comm",
"cp",
"cut",
"date",
"dirname",
"du",
"echo",
"ed",
"env",
"expand",
"expr",
"false",
"find",
"fold",
"grep",
"head",
"hostname",
"join",
"link",
"ls",
"md5sum",
"mkdir",
"mktemp",
"mv",
"nl",
"od",
"paste",
"pathchk",
"printenv",
"printf",
"pwd",
"readlink",
"rev",
"rm",
"rmdir",
"sed",
"seq",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512-224sum",
"sha512-256sum",
"sha512sum",
"sleep",
"sort",
"split",
"sponge",
"strings",
"sync",
"tail",
"tar",
"tee",
"test",
"tftp",
"touch",
"tr",
"true",
"tsort",
"tty",
"unexpand",
"uniq",
"unlink",
"uudecode",
"uuencode",
"wc",
"which",
"whoami",
"xargs",
"xinstall",
"yes",
]
config("sbase_config") {
cflags = [
"-Wno-sign-compare",
"-Wno-sometimes-uninitialized",
"-Wno-missing-field-initializers",
"-Wno-tautological-constant-out-of-range-compare",
]
}
foreach(bin, sbase_binaries) {
executable(bin + "_bin") {
output_name = bin
sources = [
"$bin.c",
]
libs = [ "zircon" ]
deps = [
"libutf",
"libutil",
"//sdk/lib/fdio",
]
configs += [ ":sbase_config" ]
}
package(bin) {
deps = [
":${bin}_bin",
]
binaries = [
{
name = bin
shell = true
},
]
}
}
group("sbase") {
deps = []
foreach(pkg, sbase_binaries) {
deps += [ ":" + pkg ]
}
}
group("common") {
deps = []
foreach(pkg, common_binaries) {
deps += [ ":" + pkg ]
}
}