Revert "Revert "Do not use PCRE2 in libselinux_vendor""
This reverts commit 832c8466e9
.
Also make sure regex.c is compiled for all targets that libselinux is
built for.
Bug: 37919668
Bug: 37343404
Test: Build and boot
Change-Id: I6bcced2d3675899cf976ad3cd30e591539d2aaa1
Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
parent
43d548e365
commit
a1b5897b8b
1 changed files with 11 additions and 11 deletions
|
@ -1,6 +1,4 @@
|
|||
common_CFLAGS = [
|
||||
"-DUSE_PCRE2",
|
||||
|
||||
// Persistently stored patterns (pcre2) are architecture dependent.
|
||||
// In particular paterns built on amd64 can not run on devices with armv7
|
||||
// (32bit). Therefore, this feature stays off for now.
|
||||
|
@ -26,7 +24,6 @@ cc_defaults {
|
|||
"src/label.c",
|
||||
"src/label_support.c",
|
||||
"src/matchpathcon.c",
|
||||
"src/regex.c",
|
||||
"src/setrans_client.c",
|
||||
"src/sha1.c",
|
||||
],
|
||||
|
@ -92,16 +89,9 @@ cc_defaults {
|
|||
|
||||
local_include_dirs: ["include"],
|
||||
export_include_dirs: ["include"],
|
||||
|
||||
static: {
|
||||
whole_static_libs: ["libpcre2"],
|
||||
},
|
||||
shared: {
|
||||
shared_libs: ["libpcre2"],
|
||||
},
|
||||
}
|
||||
|
||||
cc_library {
|
||||
cc_library_shared {
|
||||
name: "libselinux_vendor",
|
||||
defaults: ["libselinux_defaults"],
|
||||
vendor: true,
|
||||
|
@ -118,9 +108,11 @@ cc_library {
|
|||
name: "libselinux",
|
||||
defaults: ["libselinux_defaults"],
|
||||
host_supported: true,
|
||||
cflags: ["-DUSE_PCRE2"],
|
||||
|
||||
srcs: [
|
||||
"src/label_file.c",
|
||||
"src/regex.c",
|
||||
],
|
||||
|
||||
target: {
|
||||
|
@ -166,6 +158,13 @@ cc_library {
|
|||
version_script: "exported.map",
|
||||
},
|
||||
},
|
||||
|
||||
static: {
|
||||
whole_static_libs: ["libpcre2"],
|
||||
},
|
||||
shared: {
|
||||
shared_libs: ["libpcre2"],
|
||||
},
|
||||
}
|
||||
|
||||
// If one attempts to comment out the sefcontext_compile target in the
|
||||
|
@ -182,6 +181,7 @@ cc_library {
|
|||
//cc_binary_host {
|
||||
// name: "sefcontext_compile",
|
||||
// cflags: common_CFLAGS,
|
||||
// cflags: ["-DUSE_PCRE2"],
|
||||
// srcs: ["utils/sefcontext_compile.c"],
|
||||
//
|
||||
// static_libs: ["libselinux"],
|
||||
|
|
Loading…
Reference in a new issue