Android.bp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. cc_defaults {
  2. name: "toolbox_defaults",
  3. cflags: [
  4. "-Werror",
  5. "-Wno-unused-parameter",
  6. "-Wno-unused-const-variable",
  7. "-D_FILE_OFFSET_BITS=64",
  8. "-DWITHOUT_NLS",
  9. "-DWITHOUT_BZ2",
  10. "-DWITHOUT_GZIP",
  11. ],
  12. }
  13. genrule {
  14. name: "toolbox_input_labels",
  15. tool_files: ["generate-input.h-labels.py"],
  16. cmd: "$(location) $(in) >$(out)",
  17. srcs: [":kernel_input_headers"],
  18. out: ["input.h-labels.h"],
  19. }
  20. cc_defaults {
  21. name: "toolbox_binary_defaults",
  22. defaults: ["toolbox_defaults"],
  23. cpp_std: "experimental",
  24. srcs: [
  25. "toolbox.c",
  26. "getevent.c",
  27. "getprop.cpp",
  28. ],
  29. generated_headers: [
  30. "toolbox_input_labels",
  31. ],
  32. shared_libs: [
  33. "libbase",
  34. ],
  35. static_libs: ["libpropertyinfoparser"],
  36. symlinks: [
  37. "getevent",
  38. "getprop",
  39. ],
  40. }
  41. cc_binary {
  42. name: "toolbox",
  43. defaults: ["toolbox_binary_defaults"],
  44. recovery_available: true,
  45. }
  46. cc_binary {
  47. name: "toolbox_vendor",
  48. stem: "toolbox",
  49. vendor: true,
  50. defaults: ["toolbox_binary_defaults"],
  51. }
  52. // We only want 'r' on userdebug and eng builds.
  53. cc_binary {
  54. name: "r",
  55. defaults: ["toolbox_defaults"],
  56. srcs: ["r.c"],
  57. vendor_available: true,
  58. }
  59. // We build BSD grep separately (but see http://b/111849261).
  60. cc_defaults {
  61. name: "grep_common",
  62. defaults: ["toolbox_defaults"],
  63. srcs: [
  64. "upstream-netbsd/usr.bin/grep/fastgrep.c",
  65. "upstream-netbsd/usr.bin/grep/file.c",
  66. "upstream-netbsd/usr.bin/grep/grep.c",
  67. "upstream-netbsd/usr.bin/grep/queue.c",
  68. "upstream-netbsd/usr.bin/grep/util.c",
  69. ],
  70. symlinks: [
  71. "egrep",
  72. "fgrep",
  73. ],
  74. sanitize: {
  75. integer_overflow: false,
  76. },
  77. }
  78. cc_binary {
  79. name: "grep",
  80. defaults: ["grep_common"],
  81. recovery_available: true,
  82. }
  83. // Build vendor grep.
  84. // TODO: Add vendor_available to "grep" module and remove "grep_vendor" module
  85. // when vendor_available is fully supported.
  86. cc_binary {
  87. name: "grep_vendor",
  88. stem: "grep",
  89. vendor: true,
  90. defaults: ["grep_common"],
  91. }