Android.bp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // Copyright (C) 2011-2012 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. cc_library_shared {
  17. name: "libbcinfo",
  18. vendor_available: true,
  19. vndk: {
  20. enabled: true,
  21. support_system_process: true,
  22. },
  23. host_supported: true,
  24. defaults: [
  25. "llvm-defaults",
  26. "rs-version",
  27. ],
  28. srcs: [
  29. "BitcodeTranslator.cpp",
  30. "BitcodeWrapper.cpp",
  31. "MetadataExtractor.cpp",
  32. ],
  33. cflags: [
  34. "-Wall",
  35. "-Wno-unused-parameter",
  36. "-Werror",
  37. "-D__DISABLE_ASSERTS",
  38. ],
  39. product_variables: {
  40. eng: {
  41. cflags: ["-U__DISABLE_ASSERTS"],
  42. },
  43. },
  44. header_libs: ["libbcinfo-headers"],
  45. export_header_lib_headers: ["libbcinfo-headers"],
  46. include_dirs: [
  47. "frameworks/rs",
  48. "frameworks/compile/slang",
  49. "frameworks/compile/libbcc/lib",
  50. ],
  51. static_libs: [
  52. "libLLVMWrap",
  53. "libLLVMBitReader_2_7",
  54. "libLLVMBitReader_3_0",
  55. "libLLVMBitWriter_3_2",
  56. "libStripUnkAttr",
  57. ],
  58. target: {
  59. windows: {
  60. enabled: true,
  61. shared_libs: ["libLLVM_android"],
  62. },
  63. darwin: {
  64. shared_libs: ["libLLVM_android"],
  65. },
  66. linux_glibc: {
  67. allow_undefined_symbols: true,
  68. },
  69. host: {
  70. compile_multilib: "first",
  71. static_libs: [
  72. "libcutils",
  73. "liblog",
  74. ],
  75. product_variables: {
  76. unbundled_build: {
  77. // don't build for unbundled branches
  78. enabled: false,
  79. },
  80. },
  81. },
  82. android: {
  83. shared_libs: [
  84. "liblog",
  85. ],
  86. static_libs: [
  87. // Statically link-in the required LLVM libraries
  88. "libLLVMBitReader",
  89. "libLLVMCore",
  90. "libLLVMSupport",
  91. ],
  92. // Export only the symbols in the bcinfo namespace. In particular,
  93. // do not, export symbols from the LLVM libraries.
  94. version_script: "libbcinfo.map",
  95. },
  96. },
  97. }
  98. cc_library_headers {
  99. name: "libbcinfo-headers",
  100. vendor_available: true,
  101. host_supported: true,
  102. export_include_dirs: ["include"],
  103. target: {
  104. windows: {
  105. enabled: true,
  106. },
  107. },
  108. }
  109. subdirs = [
  110. "BitReader_2_7",
  111. "BitReader_3_0",
  112. "tools",
  113. "Wrap",
  114. ]