DO NOT MERGE: Merge Oreo MR1 into master

Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: I255d62a537579ff74c6302a796ecdf0f7223656d
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 3a4b6a4..0000000
--- a/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-named-subdir-makefiles, libselinux)
diff --git a/libselinux/Android.bp b/libselinux/Android.bp
index cd92e05..b13f577 100644
--- a/libselinux/Android.bp
+++ b/libselinux/Android.bp
@@ -204,23 +204,15 @@
     },
 }
 
-// If one attempts to comment out the sefcontext_compile target in the
-// Android.mk that exists in the directory of this Android.bp file, understand
-// that I encountered 2 issues. The first issue was that it could not find
-// sepol/sepol.h. This is usually an issue if a dependency between the
-// export_includes of another component is not coupled to this component
-// properly. Looking at the Makefile from upstream, sefcontext_compile seems
-// to have a dependency on libsepol. The second issue occurs when you add the
-// libsepol dependency. The build system claims that their is no libsepol
-// library declared anywhere. Switching sefcontext_compile to an Android.mk for
-// now resolved the issue.
-//################################
-//cc_binary_host {
-//    name: "sefcontext_compile",
-//    cflags: common_CFLAGS,
-//    cflags: ["-DUSE_PCRE2"],
-//    srcs: ["utils/sefcontext_compile.c"],
-//
-//    static_libs: ["libselinux"],
-//    whole_static_libs: common_LIBRARIES,
-//}
+cc_binary_host {
+    name: "sefcontext_compile",
+    defaults: ["libselinux_defaults"],
+    cflags: ["-DUSE_PCRE2"],
+    srcs: ["utils/sefcontext_compile.c"],
+
+    static_libs: [
+        "libselinux",
+        "libsepol",
+    ],
+    whole_static_libs: ["libpcre2"],
+}
diff --git a/libselinux/Android.mk b/libselinux/Android.mk
deleted file mode 100644
index 92697f4..0000000
--- a/libselinux/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-# This Android.mk serves only to build sefcontext_compile. This was needed
-# to work-around an issue/bug in the blueprint files. See the Android.bp
-# file in the same directory for more details.
-
-###################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := sefcontext_compile
-LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -Wall -Werror -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS
-LOCAL_SRC_FILES := utils/sefcontext_compile.c
-LOCAL_STATIC_LIBRARIES := libsepol libselinux
-LOCAL_WHOLE_STATIC_LIBRARIES := libpcre2
-LOCAL_CXX_STL := none
-
-include $(BUILD_HOST_EXECUTABLE)