2018-01-08 22:50:55 +01:00
|
|
|
cc_defaults {
|
|
|
|
name: "toolbox_defaults",
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wno-unused-const-variable",
|
2018-01-23 01:15:55 +01:00
|
|
|
"-D_FILE_OFFSET_BITS=64",
|
2018-04-21 02:46:03 +02:00
|
|
|
"-DWITHOUT_NLS",
|
2019-03-28 22:29:00 +01:00
|
|
|
"-DWITHOUT_BZ2",
|
|
|
|
"-DWITHOUT_GZIP",
|
2017-05-23 03:08:02 +02:00
|
|
|
],
|
2018-01-08 22:50:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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"],
|
|
|
|
}
|
|
|
|
|
2018-01-09 22:20:08 +01:00
|
|
|
cc_defaults {
|
|
|
|
name: "toolbox_binary_defaults",
|
2018-01-08 22:50:55 +01:00
|
|
|
defaults: ["toolbox_defaults"],
|
2018-01-02 20:50:16 +01:00
|
|
|
cpp_std: "experimental",
|
2018-01-08 22:50:55 +01:00
|
|
|
srcs: [
|
|
|
|
"toolbox.c",
|
|
|
|
"getevent.c",
|
2018-01-02 20:50:16 +01:00
|
|
|
"getprop.cpp",
|
2018-01-08 22:50:55 +01:00
|
|
|
],
|
|
|
|
generated_headers: [
|
|
|
|
"toolbox_input_labels",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
2018-01-02 20:50:16 +01:00
|
|
|
"libbase",
|
2018-01-08 22:50:55 +01:00
|
|
|
],
|
2018-01-02 20:50:16 +01:00
|
|
|
static_libs: ["libpropertyinfoparser"],
|
2018-01-08 22:50:55 +01:00
|
|
|
|
|
|
|
symlinks: [
|
|
|
|
"getevent",
|
2018-01-02 20:50:16 +01:00
|
|
|
"getprop",
|
2018-01-08 22:50:55 +01:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-01-09 22:20:08 +01:00
|
|
|
cc_binary {
|
|
|
|
name: "toolbox",
|
|
|
|
defaults: ["toolbox_binary_defaults"],
|
2018-05-29 09:41:30 +02:00
|
|
|
recovery_available: true,
|
2018-01-09 22:20:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "toolbox_vendor",
|
|
|
|
stem: "toolbox",
|
|
|
|
vendor: true,
|
|
|
|
defaults: ["toolbox_binary_defaults"],
|
|
|
|
}
|
|
|
|
|
2018-07-26 23:43:31 +02:00
|
|
|
// We build BSD grep separately (but see http://b/111849261).
|
2018-08-01 19:35:46 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "grep_common",
|
2018-07-26 23:43:31 +02:00
|
|
|
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",
|
|
|
|
],
|
2018-08-01 19:35:46 +02:00
|
|
|
symlinks: [
|
|
|
|
"egrep",
|
|
|
|
"fgrep",
|
|
|
|
],
|
2018-07-26 23:43:31 +02:00
|
|
|
sanitize: {
|
|
|
|
integer_overflow: false,
|
|
|
|
},
|
|
|
|
}
|
2018-08-01 19:35:46 +02:00
|
|
|
|
|
|
|
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"],
|
|
|
|
}
|