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", |
Colin Cross | 07183db | 2023-03-30 10:11:57 -0700 | [diff] [blame] | 35 | "-D_FILE_OFFSET_BITS=64", |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 36 | ], |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 37 | export_include_dirs: ["include"], |
| 38 | shared_libs: [ |
Jaegeuk Kim | a2df793 | 2019-02-13 15:24:01 -0800 | [diff] [blame] | 39 | "libbase", |
Dan Willemsen | 23df846 | 2017-09-27 16:26:36 -0700 | [diff] [blame] | 40 | "libz", |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 41 | ], |
| 42 | |
| 43 | target: { |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 44 | windows: { |
| 45 | host_ldlibs: ["-lws2_32"], |
| 46 | enabled: true, |
| 47 | }, |
| 48 | |
| 49 | android: { |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 50 | shared_libs: [ |
| 51 | "libbase", |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 52 | ], |
| 53 | |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 54 | shared: { |
| 55 | cflags: ["-DREAL_UUID"], |
| 56 | shared_libs: [ |
| 57 | "libcutils", |
| 58 | "libext2_uuid", |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 59 | ], |
Alex Deymo | e8ed694 | 2017-01-11 16:54:52 -0800 | [diff] [blame] | 60 | }, |
| 61 | }, |
| 62 | }, |
| 63 | } |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 64 | |
| 65 | python_binary_host { |
| 66 | name: "mkuserimg_mke2fs", |
| 67 | srcs: [ |
| 68 | "mkuserimg_mke2fs.py", |
| 69 | ], |
| 70 | |
Daniel Mentz | 62556d4 | 2019-09-10 16:31:53 -0700 | [diff] [blame] | 71 | data: [ |
| 72 | "mke2fs.conf", |
| 73 | ], |
| 74 | |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 75 | version: { |
Kelvin Zhang | 64c6fd9 | 2021-11-22 21:20:58 -0800 | [diff] [blame] | 76 | py3: { |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 77 | enabled: true, |
| 78 | embedded_launcher: true, |
| 79 | }, |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 80 | }, |
| 81 | |
| 82 | required: [ |
| 83 | "mke2fs", |
| 84 | "e2fsdroid", |
| 85 | ], |
Tao Bao | 6d5e439 | 2018-08-14 22:16:01 -0700 | [diff] [blame] | 86 | } |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 87 | |
Tao Bao | 6d5e439 | 2018-08-14 22:16:01 -0700 | [diff] [blame] | 88 | prebuilt_etc { |
| 89 | name: "mke2fs.conf", |
| 90 | recovery_available: true, |
| 91 | src: "mke2fs.conf", |
Tianjie Xu | 0b0256b | 2018-08-09 00:19:10 -0700 | [diff] [blame] | 92 | } |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 93 | |
Felka Chang | de59db4 | 2020-05-04 15:51:27 +0800 | [diff] [blame] | 94 | // TODO(b/157625953): Can't embedded into the other package because of missing variant |
| 95 | filegroup { |
| 96 | name: "mke2fs_conf", |
| 97 | srcs: [ |
| 98 | "mke2fs.conf", |
| 99 | ], |
| 100 | visibility: [ |
Dan Willemsen | 466845d | 2021-09-15 00:12:00 -0700 | [diff] [blame] | 101 | "//development/build", |
Felka Chang | de59db4 | 2020-05-04 15:51:27 +0800 | [diff] [blame] | 102 | "//system/apex/apexer", |
| 103 | ], |
| 104 | } |
| 105 | |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 106 | cc_binary_host { |
| 107 | name: "blk_alloc_to_base_fs", |
Jaegeuk Kim | 03fcd45 | 2019-02-13 15:24:01 -0800 | [diff] [blame] | 108 | srcs: ["blk_alloc_to_base_fs.cpp"], |
Dan Willemsen | 94da71a | 2018-11-19 18:32:02 -0800 | [diff] [blame] | 109 | shared_libs: ["libcutils"], |
| 110 | target: { |
| 111 | host: { |
| 112 | cflags: ["-DHOST"], |
| 113 | }, |
| 114 | }, |
| 115 | cflags: [ |
| 116 | "-Wall", |
| 117 | "-Werror", |
| 118 | ], |
| 119 | } |