Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 1 | cc_library_host_shared { |
| 2 | name: "libsepolwrap", |
| 3 | srcs: ["sepol_wrap.cpp"], |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 4 | shared_libs: ["libsepol"], |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 5 | cflags: ["-Wall", "-Werror",], |
| 6 | export_include_dirs: ["include"], |
Dan Willemsen | 948354a | 2017-09-01 14:08:46 -0700 | [diff] [blame] | 7 | |
| 8 | // libsepolwrap gets loaded from the system python, which does not have the |
| 9 | // ASAN runtime. So turn off sanitization for ourself, and use static |
| 10 | // libraries, since the shared libraries will use ASAN. |
| 11 | static_libs: ["libbase"], |
| 12 | stl: "libc++_static", |
| 13 | sanitize: { |
| 14 | never: true, |
| 15 | }, |
Jeff Vander Stoep | bdfc030 | 2017-05-25 09:53:47 -0700 | [diff] [blame] | 16 | } |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 17 | |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 18 | python_defaults { |
| 19 | name: "py2_only", |
| 20 | version: { |
| 21 | py2: { |
Jeff Vander Stoep | e9777e3 | 2017-09-23 15:11:25 -0700 | [diff] [blame^] | 22 | embedded_launcher: true, |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 23 | enabled: true, |
| 24 | }, |
| 25 | py3: { |
| 26 | enabled: false, |
| 27 | }, |
| 28 | }, |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 29 | } |
| 30 | |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 31 | python_binary_host { |
| 32 | name: "treble_sepolicy_tests", |
| 33 | srcs: [ |
| 34 | "treble_sepolicy_tests.py", |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 35 | "mini_parser.py", |
| 36 | "policy.py", |
| 37 | ], |
| 38 | required: ["libsepolwrap"], |
| 39 | defaults: ["py2_only"], |
| 40 | } |
| 41 | |
| 42 | python_binary_host { |
| 43 | name: "sepolicy_tests", |
| 44 | srcs: [ |
| 45 | "sepolicy_tests.py", |
| 46 | "policy.py", |
| 47 | ], |
| 48 | required: ["libsepolwrap"], |
| 49 | defaults: ["py2_only"], |
| 50 | } |
| 51 | |
| 52 | python_binary_host { |
| 53 | name: "searchpolicy", |
| 54 | srcs: [ |
| 55 | "searchpolicy.py", |
Jeff Vander Stoep | a7d2c5b | 2017-09-23 14:42:50 -0700 | [diff] [blame] | 56 | "policy.py", |
| 57 | ], |
| 58 | required: ["libsepolwrap"], |
| 59 | defaults: ["py2_only"], |
Jeff Vander Stoep | 1fc0682 | 2017-05-31 15:36:07 -0700 | [diff] [blame] | 60 | } |