aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2022-03-16 01:53:41 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-16 01:53:41 +0000
commit4dc12c982695ebbba4cb57269a32d3c00875d08a (patch)
tree66d50626296032e95c21ec92204330e8b3a089fb
parent649d578ed2eb96a81b7a1b58aeb4b2e7a107f498 (diff)
parent7aa7467340619e580623be7c986dd95729660925 (diff)
downloadselinux-4dc12c982695ebbba4cb57269a32d3c00875d08a.tar.gz
Update Android.bp am: 0ff24d85f1 am: 2c53b55090 am: b773de7d86 am: 7aa7467340
Original change: https://android-review.googlesource.com/c/platform/external/selinux/+/2024487 Change-Id: I574ed2c5ce8f7b7aa1c0e84beb9617072304db96
-rw-r--r--libsepol/Android.bp35
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,
}