Update Android.bp

Uses defaults to define the cflags.

Test: build
Bug: 215415360
Change-Id: Ic128b15ac9308508aaabfee7aa2c42a46a558190
This commit is contained in:
Thiébaud Weksteen 2022-03-15 12:44:23 +11:00
parent 5ab1edf09d
commit 0ff24d85f1

View file

@ -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,
}