Android.bp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // Collect target specific code generation libraries
  2. MCLD_ARM_LIBS = [
  3. "libmcldARMTarget",
  4. "libmcldARMInfo",
  5. ]
  6. MCLD_AARCH64_LIBS = [
  7. "libmcldAArch64Target",
  8. "libmcldAArch64Info",
  9. ]
  10. MCLD_MIPS_LIBS = [
  11. "libmcldMipsTarget",
  12. "libmcldMipsInfo",
  13. ]
  14. MCLD_X86_LIBS = [
  15. "libmcldX86Target",
  16. "libmcldX86Info",
  17. ]
  18. // Build Options.inc from Options.td
  19. llvm_tblgen {
  20. name: "mcld-gen-options",
  21. in: "Options.td",
  22. outs: ["Options.inc"],
  23. }
  24. cc_binary {
  25. name: "ld.mc",
  26. defaults: ["mcld-defaults"],
  27. host_supported: true,
  28. generated_headers: ["mcld-gen-options"],
  29. srcs: ["Main.cpp"],
  30. // arch-specific static libraries depend on libmcldTarget.
  31. // Can be removed once soong supports transitive static library dependencies
  32. group_static_libs: true,
  33. static_libs: [
  34. "libmcldADT",
  35. "libmcldCore",
  36. "libmcldFragment",
  37. "libmcldLD",
  38. "libmcldLDVariant",
  39. "libmcldMC",
  40. "libmcldObject",
  41. "libmcldScript",
  42. "libmcldSupport",
  43. "libmcldTarget",
  44. ],
  45. shared_libs: [
  46. "libLLVM_android",
  47. "libz",
  48. ],
  49. target: {
  50. host: {
  51. static_libs: MCLD_ARM_LIBS + MCLD_AARCH64_LIBS +
  52. MCLD_MIPS_LIBS + MCLD_X86_LIBS,
  53. },
  54. // Add target specific code generation libraries
  55. android_arm: {
  56. static_libs: MCLD_ARM_LIBS,
  57. },
  58. android_arm64: {
  59. // Include ARM libs to enable 32-bit linking on AARCH64 targets
  60. static_libs: MCLD_ARM_LIBS + MCLD_AARCH64_LIBS,
  61. },
  62. android_mips: {
  63. static_libs: MCLD_MIPS_LIBS,
  64. },
  65. android_mips64: {
  66. static_libs: MCLD_MIPS_LIBS,
  67. },
  68. android_x86: {
  69. static_libs: MCLD_X86_LIBS,
  70. },
  71. android_x86_64: {
  72. static_libs: MCLD_X86_LIBS,
  73. },
  74. arm_on_x86: {
  75. static_libs: MCLD_ARM_LIBS + MCLD_AARCH64_LIBS,
  76. },
  77. arm_on_x86_64: {
  78. static_libs: MCLD_ARM_LIBS + MCLD_AARCH64_LIBS,
  79. },
  80. },
  81. }