Android.bp 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. subdirs = [
  2. "androidmk",
  3. "bpfix",
  4. "cmd/*",
  5. "fs",
  6. "finder",
  7. "jar",
  8. "zip",
  9. "third_party/zip",
  10. "ui/*",
  11. ]
  12. bootstrap_go_package {
  13. name: "soong-env",
  14. pkgPath: "android/soong/env",
  15. srcs: [
  16. "env/env.go",
  17. ],
  18. }
  19. bootstrap_go_package {
  20. name: "soong",
  21. pkgPath: "android/soong",
  22. deps: [
  23. "blueprint",
  24. ],
  25. srcs: [
  26. "doc.go",
  27. ],
  28. }
  29. bootstrap_go_package {
  30. name: "soong-android",
  31. pkgPath: "android/soong/android",
  32. deps: [
  33. "blueprint",
  34. "blueprint-bootstrap",
  35. "soong",
  36. "soong-env",
  37. ],
  38. srcs: [
  39. "android/androidmk.go",
  40. "android/api_levels.go",
  41. "android/arch.go",
  42. "android/config.go",
  43. "android/defaults.go",
  44. "android/defs.go",
  45. "android/expand.go",
  46. "android/hooks.go",
  47. "android/makevars.go",
  48. "android/module.go",
  49. "android/mutator.go",
  50. "android/namespace.go",
  51. "android/neverallow.go",
  52. "android/onceper.go",
  53. "android/package_ctx.go",
  54. "android/paths.go",
  55. "android/prebuilt.go",
  56. "android/proto.go",
  57. "android/register.go",
  58. "android/singleton.go",
  59. "android/testing.go",
  60. "android/util.go",
  61. "android/variable.go",
  62. "android/writedocs.go",
  63. // Lock down environment access last
  64. "android/env.go",
  65. ],
  66. testSrcs: [
  67. "android/config_test.go",
  68. "android/expand_test.go",
  69. "android/namespace_test.go",
  70. "android/paths_test.go",
  71. "android/prebuilt_test.go",
  72. "android/util_test.go",
  73. "android/variable_test.go",
  74. ],
  75. }
  76. bootstrap_go_package {
  77. name: "soong-cc-config",
  78. pkgPath: "android/soong/cc/config",
  79. deps: [
  80. "soong-android",
  81. ],
  82. srcs: [
  83. "cc/config/clang.go",
  84. "cc/config/global.go",
  85. "cc/config/tidy.go",
  86. "cc/config/toolchain.go",
  87. "cc/config/arm_device.go",
  88. "cc/config/arm64_device.go",
  89. "cc/config/mips_device.go",
  90. "cc/config/mips64_device.go",
  91. "cc/config/x86_device.go",
  92. "cc/config/x86_64_device.go",
  93. "cc/config/x86_darwin_host.go",
  94. "cc/config/x86_linux_host.go",
  95. "cc/config/x86_linux_bionic_host.go",
  96. "cc/config/x86_windows_host.go",
  97. ],
  98. testSrcs: [
  99. "cc/config/tidy_test.go",
  100. ],
  101. }
  102. bootstrap_go_package {
  103. name: "soong-cc",
  104. pkgPath: "android/soong/cc",
  105. deps: [
  106. "blueprint",
  107. "blueprint-pathtools",
  108. "soong",
  109. "soong-android",
  110. "soong-cc-config",
  111. "soong-genrule",
  112. ],
  113. srcs: [
  114. "cc/androidmk.go",
  115. "cc/builder.go",
  116. "cc/cc.go",
  117. "cc/check.go",
  118. "cc/coverage.go",
  119. "cc/gen.go",
  120. "cc/lto.go",
  121. "cc/makevars.go",
  122. "cc/pgo.go",
  123. "cc/prebuilt.go",
  124. "cc/proto.go",
  125. "cc/relocation_packer.go",
  126. "cc/rs.go",
  127. "cc/sanitize.go",
  128. "cc/sabi.go",
  129. "cc/stl.go",
  130. "cc/strip.go",
  131. "cc/tidy.go",
  132. "cc/util.go",
  133. "cc/vndk.go",
  134. "cc/vndk_prebuilt.go",
  135. "cc/cmakelists.go",
  136. "cc/compiler.go",
  137. "cc/installer.go",
  138. "cc/linker.go",
  139. "cc/binary.go",
  140. "cc/library.go",
  141. "cc/object.go",
  142. "cc/test.go",
  143. "cc/toolchain_library.go",
  144. "cc/ndk_prebuilt.go",
  145. "cc/ndk_headers.go",
  146. "cc/ndk_library.go",
  147. "cc/ndk_sysroot.go",
  148. "cc/llndk_library.go",
  149. "cc/kernel_headers.go",
  150. "cc/genrule.go",
  151. ],
  152. testSrcs: [
  153. "cc/cc_test.go",
  154. "cc/gen_test.go",
  155. "cc/library_test.go",
  156. "cc/test_data_test.go",
  157. ],
  158. pluginFor: ["soong_build"],
  159. }
  160. bootstrap_go_package {
  161. name: "soong-genrule",
  162. pkgPath: "android/soong/genrule",
  163. deps: [
  164. "blueprint",
  165. "blueprint-pathtools",
  166. "soong",
  167. "soong-android",
  168. "soong-shared",
  169. ],
  170. srcs: [
  171. "genrule/filegroup.go",
  172. "genrule/genrule.go",
  173. ],
  174. pluginFor: ["soong_build"],
  175. }
  176. bootstrap_go_package {
  177. name: "soong-phony",
  178. pkgPath: "android/soong/phony",
  179. deps: [
  180. "blueprint",
  181. "soong-android",
  182. ],
  183. srcs: [
  184. "phony/phony.go",
  185. ],
  186. pluginFor: ["soong_build"],
  187. }
  188. bootstrap_go_package {
  189. name: "soong-java",
  190. pkgPath: "android/soong/java",
  191. deps: [
  192. "blueprint",
  193. "blueprint-pathtools",
  194. "soong",
  195. "soong-android",
  196. "soong-genrule",
  197. "soong-java-config",
  198. ],
  199. srcs: [
  200. "java/aapt2.go",
  201. "java/androidmk.go",
  202. "java/app_builder.go",
  203. "java/app.go",
  204. "java/builder.go",
  205. "java/dex.go",
  206. "java/gen.go",
  207. "java/genrule.go",
  208. "java/jacoco.go",
  209. "java/java.go",
  210. "java/proto.go",
  211. "java/resources.go",
  212. "java/system_modules.go",
  213. ],
  214. testSrcs: [
  215. "java/app_test.go",
  216. "java/java_test.go",
  217. ],
  218. pluginFor: ["soong_build"],
  219. }
  220. bootstrap_go_package {
  221. name: "soong-java-config",
  222. pkgPath: "android/soong/java/config",
  223. deps: [
  224. "blueprint-proptools",
  225. "soong-android",
  226. ],
  227. srcs: [
  228. "java/config/config.go",
  229. "java/config/error_prone.go",
  230. "java/config/kotlin.go",
  231. "java/config/makevars.go",
  232. ],
  233. }
  234. bootstrap_go_package {
  235. name: "soong-python",
  236. pkgPath: "android/soong/python",
  237. deps: [
  238. "blueprint",
  239. "soong-android",
  240. ],
  241. srcs: [
  242. "python/androidmk.go",
  243. "python/binary.go",
  244. "python/builder.go",
  245. "python/defaults.go",
  246. "python/installer.go",
  247. "python/library.go",
  248. "python/python.go",
  249. "python/test.go",
  250. ],
  251. testSrcs: [
  252. "python/python_test.go",
  253. ],
  254. pluginFor: ["soong_build"],
  255. }
  256. bootstrap_go_package {
  257. name: "soong-shared",
  258. pkgPath: "android/soong/shared",
  259. srcs: [
  260. "shared/paths.go",
  261. ],
  262. }
  263. //
  264. // Defaults to enable various configurations of host bionic
  265. //
  266. cc_defaults {
  267. name: "linux_bionic_supported",
  268. host_supported: true,
  269. target: {
  270. host: {
  271. enabled: false,
  272. },
  273. linux_bionic: {
  274. enabled: true,
  275. },
  276. },
  277. }
  278. //
  279. // C static libraries extracted from the gcc toolchain
  280. //
  281. toolchain_library {
  282. name: "libatomic",
  283. defaults: ["linux_bionic_supported"],
  284. vendor_available: true,
  285. arch: {
  286. arm: {
  287. instruction_set: "arm",
  288. },
  289. },
  290. }
  291. toolchain_library {
  292. name: "libgcc",
  293. defaults: ["linux_bionic_supported"],
  294. vendor_available: true,
  295. arch: {
  296. arm: {
  297. instruction_set: "arm",
  298. },
  299. },
  300. }
  301. toolchain_library {
  302. name: "libwinpthread",
  303. host_supported: true,
  304. enabled: false,
  305. target: {
  306. windows: {
  307. enabled: true,
  308. },
  309. },
  310. }
  311. toolchain_library {
  312. name: "libgcov",
  313. defaults: ["linux_bionic_supported"],
  314. arch: {
  315. arm: {
  316. instruction_set: "arm",
  317. },
  318. },
  319. }
  320. kernel_headers {
  321. name: "device_kernel_headers",
  322. vendor: true,
  323. }
  324. cc_genrule {
  325. name: "host_bionic_linker_asm",
  326. host_supported: true,
  327. device_supported: false,
  328. target: {
  329. linux_bionic: {
  330. enabled: true,
  331. },
  332. linux_glibc: {
  333. enabled: false,
  334. },
  335. darwin: {
  336. enabled: false,
  337. },
  338. },
  339. tools: ["extract_linker"],
  340. cmd: "$(location) -s $(out) $(in)",
  341. srcs: [":linker"],
  342. out: ["linker.s"],
  343. }
  344. cc_genrule {
  345. name: "host_bionic_linker_script",
  346. host_supported: true,
  347. device_supported: false,
  348. target: {
  349. linux_bionic: {
  350. enabled: true,
  351. },
  352. linux_glibc: {
  353. enabled: false,
  354. },
  355. darwin: {
  356. enabled: false,
  357. },
  358. },
  359. tools: ["extract_linker"],
  360. cmd: "$(location) -T $(out) $(in)",
  361. srcs: [":linker"],
  362. out: ["linker.script"],
  363. }