Merge "Make some warnings impossible to override."
diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk
index abd8e3a..07a1de9 100644
--- a/core/combo/TARGET_linux-arm64.mk
+++ b/core/combo/TARGET_linux-arm64.mk
@@ -91,6 +91,7 @@
TARGET_GLOBAL_CFLAGS += \
-Werror=pointer-to-int-cast \
-Werror=int-to-pointer-cast \
+ -Werror=implicit-function-declaration \
TARGET_GLOBAL_CFLAGS += -fno-strict-volatile-bitfields
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index 5c5610e..c6f9f29 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -96,6 +96,12 @@
-include $(android_config_h) \
-I $(dir $(android_config_h))
+# Help catch common 32/64-bit errors.
+TARGET_GLOBAL_CFLAGS += \
+ -Werror=pointer-to-int-cast \
+ -Werror=int-to-pointer-cast \
+ -Werror=implicit-function-declaration \
+
ifneq ($(ARCH_MIPS_PAGE_SHIFT),)
TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT)
endif
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index d92e974..046a42b 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -97,6 +97,7 @@
TARGET_GLOBAL_CFLAGS += \
-Werror=pointer-to-int-cast \
-Werror=int-to-pointer-cast \
+ -Werror=implicit-function-declaration \
android_config_h := $(call select-android-config-h,target_linux-x86)
TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
diff --git a/core/combo/include/arch/windows/AndroidConfig.h b/core/combo/include/arch/windows/AndroidConfig.h
index 346ba89..e7eb837 100644
--- a/core/combo/include/arch/windows/AndroidConfig.h
+++ b/core/combo/include/arch/windows/AndroidConfig.h
@@ -58,19 +58,19 @@
/* TODO: replace references to this. */
#define HAVE_WIN32_IPC
+#ifdef __CYGWIN__
+#error "CYGWIN is unsupported for platform builds"
+#endif
+
/*
* Define this if you build against MSVCRT.DLL
*/
-#ifndef __CYGWIN__
-# define HAVE_MS_C_RUNTIME
-#endif
+#define HAVE_MS_C_RUNTIME
/*
* Define this if we want to use WinSock.
*/
-#ifndef __CYGWIN__
#define HAVE_WINSOCK
-#endif
/*
* We need to choose between 32-bit and 64-bit off_t. All of our code should
@@ -95,16 +95,6 @@
#define OS_PATH_SEPARATOR '\\'
/*
- * Define if <winsock2.h> exists.
- * Only MinGW has it.
- */
-#ifdef USE_MINGW
-#define HAVE_WINSOCK2_H 1
-#else
-/* #define HAVE_WINSOCK2_H */
-#endif
-
-/*
* Various definitions missing in MinGW
*/
#ifdef USE_MINGW
diff --git a/core/config.mk b/core/config.mk
index 94b8968..ecc8044 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -83,6 +83,7 @@
BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk
BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
+BUILD_NATIVE_BENCHMARK := $(BUILD_SYSTEM)/native_benchmark.mk
BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
BUILD_SHARED_TEST_LIBRARY := $(BUILD_SYSTEM)/shared_test_lib.mk
diff --git a/core/native_benchmark.mk b/core/native_benchmark.mk
new file mode 100644
index 0000000..431e40a
--- /dev/null
+++ b/core/native_benchmark.mk
@@ -0,0 +1,12 @@
+###########################################
+## A thin wrapper around BUILD_EXECUTABLE
+## Common flags for native benchmarks are added.
+###########################################
+
+LOCAL_STATIC_LIBRARIES += libbenchmark
+
+ifndef LOCAL_MODULE_PATH
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
+endif
+
+include $(BUILD_EXECUTABLE)
diff --git a/target/board/generic/sepolicy/goldfish_logcat.te b/target/board/generic/sepolicy/goldfish_logcat.te
index 34ef280..a785355 100644
--- a/target/board/generic/sepolicy/goldfish_logcat.te
+++ b/target/board/generic/sepolicy/goldfish_logcat.te
@@ -1,6 +1,5 @@
# goldfish-logcat service: runs logcat -Q
type goldfish_logcat, domain;
-permissive_or_unconfined(goldfish_logcat)
domain_auto_trans(init, logcat_exec, goldfish_logcat)
diff --git a/target/board/generic/sepolicy/goldfish_setup.te b/target/board/generic/sepolicy/goldfish_setup.te
index 786c1c2..584731e 100644
--- a/target/board/generic/sepolicy/goldfish_setup.te
+++ b/target/board/generic/sepolicy/goldfish_setup.te
@@ -1,7 +1,6 @@
# goldfish-setup service: runs init.goldfish.sh script
type goldfish_setup, domain;
type goldfish_setup_exec, exec_type, file_type;
-permissive_or_unconfined(goldfish_setup)
init_daemon_domain(goldfish_setup)
diff --git a/target/board/generic/sepolicy/qemu_props.te b/target/board/generic/sepolicy/qemu_props.te
index ade111d..05c7461 100644
--- a/target/board/generic/sepolicy/qemu_props.te
+++ b/target/board/generic/sepolicy/qemu_props.te
@@ -1,7 +1,6 @@
# qemu-props service: Sets system properties on boot.
type qemu_props, domain;
type qemu_props_exec, exec_type, file_type;
-permissive_or_unconfined(qemu_props)
init_daemon_domain(qemu_props)
diff --git a/target/board/generic/sepolicy/qemud.te b/target/board/generic/sepolicy/qemud.te
index b6a35d3..41f2065 100644
--- a/target/board/generic/sepolicy/qemud.te
+++ b/target/board/generic/sepolicy/qemud.te
@@ -3,7 +3,6 @@
type qemud_exec, exec_type, file_type;
init_daemon_domain(qemud)
-permissive_or_unconfined(qemud)
# Access /dev/ttyS1.
allow qemud serial_device:chr_file rw_file_perms;