diff options
author | ThiƩbaud Weksteen <tweek@google.com> | 2022-03-15 12:44:23 +1100 |
---|---|---|
committer | ThiƩbaud Weksteen <tweek@google.com> | 2022-03-15 12:44:23 +1100 |
commit | 0ff24d85f1ec091c3cdda44e67b8e5d5c14c6d52 (patch) | |
tree | f90f621fc9f643e2e91918e2f7df34f59ee92ff5 | |
parent | 5ab1edf09d7896ffe9840b5c9119c18a4ebe5f2e (diff) | |
download | selinux-0ff24d85f1ec091c3cdda44e67b8e5d5c14c6d52.tar.gz |
Update Android.bp
Uses defaults to define the cflags.
Test: build
Bug: 215415360
Change-Id: Ic128b15ac9308508aaabfee7aa2c42a46a558190
-rw-r--r-- | libsepol/Android.bp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/libsepol/Android.bp b/libsepol/Android.bp index 5232a68a..6135745c 100644 --- a/libsepol/Android.bp +++ b/libsepol/Android.bp @@ -33,21 +33,32 @@ license { ], } -common_CFLAGS = [ - "-D_GNU_SOURCE", - "-Wall", - "-Werror", - "-W", - "-Wundef", - "-Wshadow", - "-Wno-error=missing-noreturn", - "-Wmissing-format-attribute", -] +cc_defaults { + name: "libsepol_defaults", + cflags: [ + "-D_GNU_SOURCE", + "-Wall", + "-Werror", + "-W", + "-Wundef", + "-Wshadow", + "-Wno-error=missing-noreturn", + "-Wmissing-format-attribute", + ], + target: { + bionic: { + cflags: ["-DHAVE_REALLOCARRAY"] + }, + musl: { + cflags: ["-DHAVE_REALLOCARRAY"] + } + } +} cc_library { name: "libsepol", + defaults: ["libsepol_defaults"], host_supported: true, - cflags: common_CFLAGS, srcs: [ "src/assertion.c", "src/avrule_block.c", @@ -135,7 +146,7 @@ cc_library { cc_binary_host { name: "chkcon", + defaults: ["libsepol_defaults"], srcs: ["utils/chkcon.c"], shared_libs: ["libsepol"], - cflags: common_CFLAGS, } |