Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 1 | // Copyright 2010 The Android Open Source Project |
| 2 | |
Bob Badour | 4e06008 | 2021-02-16 18:59:28 -0800 | [diff] [blame] | 3 | package { |
| 4 | default_applicable_licenses: ["system_extras_ext4_utils_license"], |
| 5 | } |
| 6 | |
| 7 | // Added automatically by a large-scale-change |
| 8 | // See: http://go/android-license-faq |
| 9 | license { |
| 10 | name: "system_extras_ext4_utils_license", |
| 11 | visibility: [":__subpackages__"], |
| 12 | license_kinds: [ |
| 13 | "SPDX-license-identifier-Apache-2.0", |
| 14 | ], |
| 15 | license_text: [ |
| 16 | "NOTICE", |
| 17 | ], |
| 18 | } |
| 19 | |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 20 | cc_library { |
| 21 | name: "libext4_utils", |
| 22 | host_supported: true, |
Inseob Kim | 4861cb1 | 2021-06-14 11:55:31 +0900 | [diff] [blame] | 23 | ramdisk_available: true, |
David Anderson | cd9bd90 | 2021-07-23 16:47:46 -0700 | [diff] [blame] | 24 | vendor_ramdisk_available: true, |
Jiyong Park | 02fd558 | 2018-05-24 14:10:32 +0900 | [diff] [blame] | 25 | recovery_available: true, |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 26 | srcs: [ |
Jaegeuk Kim | 03fcd45 | 2019-02-13 15:24:01 -0800 | [diff] [blame] | 27 | "ext4_utils.cpp", |
| 28 | "wipe.cpp", |
| 29 | "ext4_sb.cpp", |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 30 | ], |
| 31 | // Various instances of dereferencing a type-punned pointer in extent.c |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 32 | cflags: [ |
| 33 | "-Werror", |
| 34 | "-fno-strict-aliasing", |
| 35 | ], |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 36 | export_include_dirs: ["include"], |
| 37 | shared_libs: [ |
Jaegeuk Kim | a2df793 | 2019-02-13 15:24:01 -0800 | [diff] [blame] | 38 | "libbase", |
Dan Willemsen | 23df846 | 2017-09-27 16:26:36 -0700 | [diff] [blame] | 39 | "libz", |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 40 | ], |
| 41 | |
| 42 | target: { |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 43 | windows: { |
| 44 | host_ldlibs: ["-lws2_32"], |
| 45 | enabled: true, |
| 46 | }, |
| 47 | |
| 48 | android: { |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 49 | shared_libs: [ |
| 50 | "libbase", |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 51 | ], |
| 52 | |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 53 | shared: { |
| 54 | cflags: ["-DREAL_UUID"], |
| 55 | shared_libs: [ |
| 56 | "libcutils", |
| 57 | "libext2_uuid", |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 58 | ], |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 59 | }, |
| 60 | }, |
| 61 | }, |
| 62 | } |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 63 | |
| 64 | python_binary_host { |
| 65 | name: "mkuserimg_mke2fs", |
| 66 | srcs: [ |
| 67 | "mkuserimg_mke2fs.py", |
| 68 | ], |
| 69 | |
Daniel Mentz | 62556d4 | 2019-09-10 16:31:53 -0700 | [diff] [blame] | 70 | data: [ |
| 71 | "mke2fs.conf", |
| 72 | ], |
| 73 | |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 74 | version: { |
Kelvin Zhang | 64c6fd9 | 2021-11-22 21:20:58 -0800 | [diff] [blame] | 75 | py3: { |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 76 | enabled: true, |
| 77 | embedded_launcher: true, |
| 78 | }, |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 79 | }, |
| 80 | |
| 81 | required: [ |
| 82 | "mke2fs", |
| 83 | "e2fsdroid", |
| 84 | ], |
Tao Bao | 6d5e439 | 2018-08-14 22:16:01 -0700 | [diff] [blame] | 85 | } |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 86 | |
Tao Bao | 6d5e439 | 2018-08-14 22:16:01 -0700 | [diff] [blame] | 87 | prebuilt_etc { |
| 88 | name: "mke2fs.conf", |
| 89 | recovery_available: true, |
| 90 | src: "mke2fs.conf", |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 91 | } |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 92 | |
Felka Chang | de59db4 | 2020-05-04 15:51:27 +0800 | [diff] [blame] | 93 | // TODO(b/157625953): Can't embedded into the other package because of missing variant |
| 94 | filegroup { |
| 95 | name: "mke2fs_conf", |
| 96 | srcs: [ |
| 97 | "mke2fs.conf", |
| 98 | ], |
| 99 | visibility: [ |
Dan Willemsen | 466845d | 2021-09-15 00:12:00 -0700 | [diff] [blame] | 100 | "//development/build", |
Felka Chang | de59db4 | 2020-05-04 15:51:27 +0800 | [diff] [blame] | 101 | "//system/apex/apexer", |
| 102 | ], |
| 103 | } |
| 104 | |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 105 | cc_binary_host { |
| 106 | name: "blk_alloc_to_base_fs", |
Jaegeuk Kim | 03fcd45 | 2019-02-13 15:24:01 -0800 | [diff] [blame] | 107 | srcs: ["blk_alloc_to_base_fs.cpp"], |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 108 | shared_libs: ["libcutils"], |
| 109 | target: { |
| 110 | host: { |
| 111 | cflags: ["-DHOST"], |
| 112 | }, |
| 113 | }, |
| 114 | cflags: [ |
| 115 | "-Wall", |
| 116 | "-Werror", |
| 117 | ], |
| 118 | } |