f4dafbc836
Disables integer overflow sanitization in grep on integer sanitized builds. Bug: 30969751 Test: Compiles. Change-Id: I2668ef6f2261a86f17d2a0f04d5ec7a3c0336ff1
62 lines
1.7 KiB
Text
62 lines
1.7 KiB
Text
common_cflags = [
|
|
"-Werror",
|
|
"-Wno-unused-parameter",
|
|
"-Wno-unused-const-variable",
|
|
"-include bsd-compatibility.h"
|
|
]
|
|
|
|
cc_library_static {
|
|
srcs: [
|
|
"upstream-netbsd/bin/dd/args.c",
|
|
"upstream-netbsd/bin/dd/conv.c",
|
|
"upstream-netbsd/bin/dd/dd.c",
|
|
"upstream-netbsd/bin/dd/dd_hostops.c",
|
|
"upstream-netbsd/bin/dd/misc.c",
|
|
"upstream-netbsd/bin/dd/position.c",
|
|
"upstream-netbsd/lib/libc/gen/getbsize.c",
|
|
"upstream-netbsd/lib/libc/gen/humanize_number.c",
|
|
"upstream-netbsd/lib/libc/stdlib/strsuftoll.c",
|
|
"upstream-netbsd/lib/libc/string/swab.c",
|
|
"upstream-netbsd/lib/libutil/raise_default_signal.c",
|
|
],
|
|
cflags: common_cflags + [
|
|
"-Dmain=dd_main",
|
|
"-DNO_CONV",
|
|
],
|
|
local_include_dirs: ["upstream-netbsd/include/"],
|
|
name: "libtoolbox_dd",
|
|
}
|
|
|
|
// We build BSD grep separately, so it can provide egrep and fgrep too.
|
|
cc_defaults {
|
|
name: "grep_common",
|
|
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",
|
|
],
|
|
cflags: common_cflags,
|
|
local_include_dirs: ["upstream-netbsd/include/"],
|
|
symlinks: ["egrep", "fgrep"],
|
|
|
|
sanitize: {
|
|
integer_overflow: false,
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "grep",
|
|
defaults: ["grep_common"],
|
|
}
|
|
|
|
// 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"],
|
|
}
|