diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-11-19 18:32:02 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-11-19 18:32:02 -0800 |
commit | 94da71a79b2551da351fa1a03e82395a5877b3af (patch) | |
tree | 50361756b8f05449837fba9024ba99e3123a45de /ext4_utils | |
parent | 2c06aceacc08b8b76f6ddccfae20dda63a91dea7 (diff) | |
download | extras-94da71a79b2551da351fa1a03e82395a5877b3af.tar.gz |
Convert blk_alloc_to_base_fs to Android.bp
See build/soong/README.md for more information.
Also remove a useless HOST_OS check -- HOST_OS will always be either
linux or darwin, we don't support building directly on windows.
Test: m blk_alloc_to_base_fs
Change-Id: I13927de82ff769cf3692b58b9432fb79c856b8d3
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/Android.bp | 22 | ||||
-rw-r--r-- | ext4_utils/Android.mk | 17 |
2 files changed, 20 insertions, 19 deletions
diff --git a/ext4_utils/Android.bp b/ext4_utils/Android.bp index 5b57575e..92a24e50 100644 --- a/ext4_utils/Android.bp +++ b/ext4_utils/Android.bp @@ -10,7 +10,10 @@ cc_library { "ext4_sb.c", ], // Various instances of dereferencing a type-punned pointer in extent.c - cflags: ["-Werror", "-fno-strict-aliasing"], + cflags: [ + "-Werror", + "-fno-strict-aliasing", + ], export_include_dirs: ["include"], shared_libs: [ "libsparse", @@ -40,7 +43,7 @@ cc_library { shared_libs: [ "libcutils", "libext2_uuid", - ] + ], }, }, }, @@ -74,3 +77,18 @@ prebuilt_etc { recovery_available: true, src: "mke2fs.conf", } + +cc_binary_host { + name: "blk_alloc_to_base_fs", + srcs: ["blk_alloc_to_base_fs.c"], + shared_libs: ["libcutils"], + target: { + host: { + cflags: ["-DHOST"], + }, + }, + cflags: [ + "-Wall", + "-Werror", + ], +} diff --git a/ext4_utils/Android.mk b/ext4_utils/Android.mk index fc6764b5..259fbd89 100644 --- a/ext4_utils/Android.mk +++ b/ext4_utils/Android.mk @@ -3,29 +3,12 @@ LOCAL_PATH:= $(call my-dir) # -# -- All host/targets including windows -# - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := blk_alloc_to_base_fs.c -LOCAL_MODULE := blk_alloc_to_base_fs -LOCAL_SHARED_LIBRARIES := libcutils -LOCAL_CFLAGS_darwin := -DHOST -LOCAL_CFLAGS_linux := -DHOST -LOCAL_CFLAGS += -Wall -Werror -include $(BUILD_HOST_EXECUTABLE) - -# # -- All host/targets excluding windows # -ifneq ($(HOST_OS),windows) - include $(CLEAR_VARS) LOCAL_MODULE := mke2fs.conf LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_IS_HOST_MODULE := true include $(BUILD_PREBUILT) - -endif |