8100d05778
Bug: http://b/111849261 Bug: https://bugs.exim.org/show_bug.cgi?id=2294 Test: manual Change-Id: Ia4f67b9f803c4f039d170f6d015a1bd2bb0ef23d
98 lines
2 KiB
Text
98 lines
2 KiB
Text
cc_defaults {
|
|
name: "toolbox_defaults",
|
|
|
|
cflags: [
|
|
"-Werror",
|
|
"-Wno-unused-parameter",
|
|
"-Wno-unused-const-variable",
|
|
"-D_FILE_OFFSET_BITS=64",
|
|
"-DWITHOUT_NLS",
|
|
],
|
|
}
|
|
|
|
genrule {
|
|
name: "toolbox_input_labels",
|
|
tool_files: ["generate-input.h-labels.py"],
|
|
cmd: "$(location) $(in) >$(out)",
|
|
srcs: [":kernel_input_headers"],
|
|
out: ["input.h-labels.h"],
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "toolbox_binary_defaults",
|
|
defaults: ["toolbox_defaults"],
|
|
cpp_std: "experimental",
|
|
srcs: [
|
|
"toolbox.c",
|
|
"getevent.c",
|
|
"getprop.cpp",
|
|
],
|
|
generated_headers: [
|
|
"toolbox_input_labels",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
],
|
|
static_libs: ["libpropertyinfoparser"],
|
|
|
|
symlinks: [
|
|
"getevent",
|
|
"getprop",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "toolbox",
|
|
defaults: ["toolbox_binary_defaults"],
|
|
recovery_available: true,
|
|
}
|
|
|
|
cc_binary {
|
|
name: "toolbox_vendor",
|
|
stem: "toolbox",
|
|
vendor: true,
|
|
defaults: ["toolbox_binary_defaults"],
|
|
}
|
|
|
|
// We only want 'r' on userdebug and eng builds.
|
|
cc_binary {
|
|
name: "r",
|
|
defaults: ["toolbox_defaults"],
|
|
srcs: ["r.c"],
|
|
}
|
|
|
|
// We build BSD grep separately (but see http://b/111849261).
|
|
cc_defaults {
|
|
name: "grep_common",
|
|
defaults: ["toolbox_defaults"],
|
|
srcs: [
|
|
"upstream-netbsd/usr.bin/grep/fastgrep.c",
|
|
"upstream-netbsd/usr.bin/grep/file.c",
|
|
"upstream-netbsd/usr.bin/grep/grep.c",
|
|
"upstream-netbsd/usr.bin/grep/queue.c",
|
|
"upstream-netbsd/usr.bin/grep/util.c",
|
|
],
|
|
symlinks: [
|
|
"egrep",
|
|
"fgrep",
|
|
],
|
|
sanitize: {
|
|
integer_overflow: false,
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "grep",
|
|
defaults: ["grep_common"],
|
|
recovery_available: true,
|
|
}
|
|
|
|
// Build vendor grep.
|
|
// TODO: Add vendor_available to "grep" module and remove "grep_vendor" module
|
|
// when vendor_available is fully supported.
|
|
cc_binary {
|
|
name: "grep_vendor",
|
|
stem: "grep",
|
|
vendor: true,
|
|
defaults: ["grep_common"],
|
|
}
|