Bob Badour | 8aedf25 | 2021-02-12 21:37:48 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 5 | cc_library_static { |
| 6 | name: "libRSDispatch", |
Victor Khimenko | f0890d0 | 2020-08-21 00:38:57 +0200 | [diff] [blame] | 7 | native_bridge_supported: true, |
Jiyong Park | 316ffa5 | 2017-08-10 20:37:20 +0900 | [diff] [blame] | 8 | vendor_available: true, |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 9 | |
| 10 | srcs: ["rsDispatch.cpp"], |
| 11 | |
Jiyong Park | 316ffa5 | 2017-08-10 20:37:20 +0900 | [diff] [blame] | 12 | include_dirs: [ |
| 13 | "frameworks/rs", |
Paul Duffin | fef862b | 2019-07-16 14:24:07 +0100 | [diff] [blame] | 14 | ], |
| 15 | header_libs: [ |
| 16 | "jni_headers", |
Jiyong Park | 316ffa5 | 2017-08-10 20:37:20 +0900 | [diff] [blame] | 17 | ], |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 18 | |
| 19 | cflags: [ |
Chih-Hung Hsieh | 24ab176 | 2017-09-29 14:54:13 -0700 | [diff] [blame] | 20 | "-Wall", |
| 21 | "-Werror", |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 22 | "-Wno-unused-parameter", |
Jiyong Park | 48446a8 | 2017-07-10 13:14:41 +0900 | [diff] [blame] | 23 | "-DRS_COMPATIBILITY_LIB", |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 24 | ], |
| 25 | |
Jiyong Park | 316ffa5 | 2017-08-10 20:37:20 +0900 | [diff] [blame] | 26 | |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 27 | sdk_version: "9", |
Jiyong Park | 316ffa5 | 2017-08-10 20:37:20 +0900 | [diff] [blame] | 28 | shared_libs: ["libdl", "liblog"], |
Dan Willemsen | 500d85e | 2016-10-05 14:17:13 -0700 | [diff] [blame] | 29 | // Used in librsjni, which is built as NDK code => no ASan. |
| 30 | sanitize: { |
| 31 | never: true, |
| 32 | }, |
| 33 | stl: "none", |
| 34 | } |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 35 | |
| 36 | cc_defaults { |
| 37 | name: "libRScpp-defaults", |
| 38 | defaults: ["rs-version"], |
| 39 | |
| 40 | srcs: [ |
| 41 | "RenderScript.cpp", |
| 42 | "BaseObj.cpp", |
| 43 | "Element.cpp", |
| 44 | "Type.cpp", |
| 45 | "Allocation.cpp", |
| 46 | "Script.cpp", |
| 47 | "ScriptC.cpp", |
| 48 | "ScriptIntrinsics.cpp", |
| 49 | "ScriptIntrinsicBLAS.cpp", |
| 50 | "Sampler.cpp", |
| 51 | |
| 52 | // TODO: make this not a symlink |
| 53 | "rsCppUtils.cpp", |
| 54 | ], |
| 55 | |
| 56 | cflags: [ |
| 57 | "-Werror", |
| 58 | "-Wall", |
| 59 | "-Wextra", |
Xusong Wang | c4ba028 | 2020-11-10 10:09:37 -0800 | [diff] [blame] | 60 | "-Wno-deprecated-declarations", |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 61 | "-Wno-unused-parameter", |
| 62 | "-Wno-unused-variable", |
| 63 | ], |
| 64 | |
| 65 | // We need to export not just rs/cpp but also rs. This is because |
| 66 | // RenderScript.h includes rsCppStructs.h, which includes rs/rsDefines.h. |
Orion Hodson | 0f1eaf3 | 2020-04-11 21:01:58 +0100 | [diff] [blame] | 67 | header_libs: [ |
| 68 | "jni_headers", |
| 69 | "rs-headers" |
| 70 | ], |
| 71 | export_header_lib_headers: [ |
| 72 | "jni_headers", |
| 73 | "rs-headers" |
| 74 | ], |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 75 | export_include_dirs: ["."], |
| 76 | |
| 77 | shared_libs: [ |
| 78 | "libdl", |
| 79 | "liblog", |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 80 | ], |
| 81 | } |
| 82 | |
| 83 | cc_library { |
| 84 | name: "libRScpp", |
| 85 | defaults: ["libRScpp-defaults"], |
| 86 | |
Marco Nelissen | 0ba81af | 2019-10-28 15:56:03 -0700 | [diff] [blame] | 87 | header_libs: [ |
| 88 | "libarect_headers", |
| 89 | "libbase_headers", |
Marco Nelissen | 0ba81af | 2019-10-28 15:56:03 -0700 | [diff] [blame] | 90 | "libnativebase_headers", |
| 91 | "libnativewindow_headers", |
| 92 | ], |
| 93 | |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 94 | shared_libs: [ |
Marissa Wall | 8b0b3c3 | 2019-12-03 14:56:38 -0800 | [diff] [blame] | 95 | "libgui", |
Colin Cross | 00b1411 | 2017-04-19 15:23:41 -0700 | [diff] [blame] | 96 | "libutils", |
| 97 | ], |
| 98 | |
| 99 | static_libs: ["libRSDispatch"], |
| 100 | } |
| 101 | |
| 102 | cc_library_static { |
| 103 | name: "libRScpp_static", |
| 104 | defaults: ["libRScpp-defaults"], |
| 105 | |
| 106 | cflags: ["-DRS_COMPATIBILITY_LIB"], |
| 107 | |
| 108 | sdk_version: "9", |
| 109 | whole_static_libs: ["libRSDispatch"], |
| 110 | |
| 111 | ldflags: [ |
| 112 | "-Wl,--exclude-libs,libc++_static.a", |
| 113 | ], |
| 114 | stl: "c++_static", |
| 115 | } |