aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--native/dicttoolkit/Android.mk1
-rw-r--r--native/dicttoolkit/UnitTests.mk2
-rw-r--r--native/jni/Android.mk4
-rw-r--r--native/jni/HostUnitTests.mk5
-rw-r--r--native/jni/TargetUnitTests.mk6
-rw-r--r--native/jni/tests/dictionary/utils/trie_map_test.cpp1
-rw-r--r--tests/Android.mk6
-rw-r--r--tools/dicttool/Android.mk9
-rw-r--r--tools/dicttool/NativeLib.mk10
9 files changed, 12 insertions, 32 deletions
diff --git a/native/dicttoolkit/Android.mk b/native/dicttoolkit/Android.mk
index 4befecf4a..7a446860c 100644
--- a/native/dicttoolkit/Android.mk
+++ b/native/dicttoolkit/Android.mk
@@ -51,7 +51,6 @@ LOCAL_SRC_FILES := $(LATIN_IME_DICT_TOOLKIT_MAIN_SRC_FILES) \
LOCAL_MODULE := dicttoolkit
LOCAL_MODULE_TAGS := optional
-LOCAL_CLANG := true
LOCAL_CXX_STL := libc++
include $(BUILD_HOST_EXECUTABLE)
diff --git a/native/dicttoolkit/UnitTests.mk b/native/dicttoolkit/UnitTests.mk
index da1b3767c..55177c084 100644
--- a/native/dicttoolkit/UnitTests.mk
+++ b/native/dicttoolkit/UnitTests.mk
@@ -31,7 +31,6 @@ include $(LATIN_IME_CORE_PATH)/NativeFileList.mk
LATIN_IME_SRC_DIR := src
LOCAL_ADDRESS_SANITIZER := true
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
LOCAL_CXX_STL := libc++
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
$(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
@@ -46,7 +45,6 @@ include $(CLEAR_VARS)
LOCAL_ADDRESS_SANITIZER := true
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
LOCAL_CXX_STL := libc++
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
$(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
diff --git a/native/jni/Android.mk b/native/jni/Android.mk
index 6003a6f64..53846485f 100644
--- a/native/jni/Android.mk
+++ b/native/jni/Android.mk
@@ -63,7 +63,6 @@ endif # FLAG_DO_PROFILE
LOCAL_MODULE := libjni_latinime_common_static
LOCAL_MODULE_TAGS := optional
-LOCAL_CLANG := true
LOCAL_SDK_VERSION := 14
LOCAL_NDK_STL_VARIANT := c++_static
@@ -87,9 +86,9 @@ endif # FLAG_DO_PROFILE
LOCAL_MODULE := libjni_latinime
LOCAL_MODULE_TAGS := optional
-LOCAL_CLANG := true
LOCAL_SDK_VERSION := 14
LOCAL_NDK_STL_VARIANT := c++_static
+LOCAL_CFLAGS := -Wall -Werror
LOCAL_LDFLAGS += -ldl
include $(BUILD_SHARED_LIBRARY)
@@ -101,3 +100,4 @@ include $(LOCAL_PATH)/HostUnitTests.mk
#################### Unit test on target environment
include $(LOCAL_PATH)/TargetUnitTests.mk
+//LOCAL_CFLAGS += -Wall -Werror
diff --git a/native/jni/HostUnitTests.mk b/native/jni/HostUnitTests.mk
index 6a8bcec2d..94cd764b4 100644
--- a/native/jni/HostUnitTests.mk
+++ b/native/jni/HostUnitTests.mk
@@ -29,8 +29,7 @@ include $(LOCAL_PATH)/NativeFileList.mk
#################### Host library for unit test
LATIN_IME_SRC_DIR := src
LOCAL_ADDRESS_SANITIZER := true
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
+LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
LOCAL_CXX_STL := libc++
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_MODULE := liblatinime_host_static_for_unittests
@@ -43,7 +42,7 @@ include $(CLEAR_VARS)
LATIN_IME_TEST_SRC_DIR := tests
LOCAL_ADDRESS_SANITIZER := true
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_CXX_STL := libc++
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_MODULE := liblatinime_host_unittests
diff --git a/native/jni/TargetUnitTests.mk b/native/jni/TargetUnitTests.mk
index 69a32edbd..32aada057 100644
--- a/native/jni/TargetUnitTests.mk
+++ b/native/jni/TargetUnitTests.mk
@@ -21,8 +21,7 @@ include $(LOCAL_PATH)/NativeFileList.mk
#################### Target library for unit test
LATIN_IME_SRC_DIR := src
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
+LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_MODULE := liblatinime_target_static_for_unittests
LOCAL_MODULE_TAGS := optional
@@ -34,8 +33,7 @@ include $(BUILD_STATIC_LIBRARY)
#################### Target native tests
include $(CLEAR_VARS)
LATIN_IME_TEST_SRC_DIR := tests
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CLANG := true
+LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
LOCAL_MODULE := liblatinime_target_unittests
LOCAL_MODULE_TAGS := tests
diff --git a/native/jni/tests/dictionary/utils/trie_map_test.cpp b/native/jni/tests/dictionary/utils/trie_map_test.cpp
index 745d39897..8f3ec9d24 100644
--- a/native/jni/tests/dictionary/utils/trie_map_test.cpp
+++ b/native/jni/tests/dictionary/utils/trie_map_test.cpp
@@ -55,6 +55,7 @@ TEST(TrieMapTest, TestRemove) {
EXPECT_TRUE(trieMap.remove(10, trieMap.getRootBitmapEntryIndex()));
EXPECT_FALSE(trieMap.getRoot(10).mIsValid);
for (const auto &element : trieMap.getEntriesInRootLevel()) {
+ (void)element; // not used
EXPECT_TRUE(false);
}
EXPECT_TRUE(trieMap.putRoot(10, 0x3FFFFF));
diff --git a/tests/Android.mk b/tests/Android.mk
index 998c1dee2..7c0bb4f71 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -28,7 +28,11 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
mockito-target-minus-junit4
-LOCAL_JAVA_LIBRARIES := android.test.mock.sdk legacy-android-test
+LOCAL_JAVA_LIBRARIES := \
+ android.test.mock.stubs \
+ android.test.runner.stubs \
+ android.test.base.stubs \
+
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk
index 6852b82b4..49816294f 100644
--- a/tools/dicttool/Android.mk
+++ b/tools/dicttool/Android.mk
@@ -16,12 +16,6 @@
# Only build if it's explicitly requested, or running mm/mmm.
ifneq ($(ONE_SHOT_MAKEFILE)$(filter $(MAKECMDGOALS),dicttool_aosp),)
-# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
-LATINIME_HOST_OSNAME := $(shell uname -s)
-ifeq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
-$(warning dicttool_aosp is not supported on $(LATINIME_HOST_OSNAME))
-else # TODO: Remove this
-
LATINIME_DICTTOOL_AOSP_LOCAL_PATH := $(call my-dir)
LOCAL_PATH := $(LATINIME_DICTTOOL_AOSP_LOCAL_PATH)
LATINIME_HOST_NATIVE_LIBNAME := liblatinime-aosp-dicttool-host
@@ -86,11 +80,8 @@ LOCAL_MODULE := dicttool_aosp
include $(BUILD_HOST_JAVA_LIBRARY)
include $(LOCAL_PATH)/etc/Android.mk
-endif # Darwin - TODO: Remove this
-
# Clear our private variables
LATINIME_DICTTOOL_AOSP_LOCAL_PATH :=
LATINIME_LOCAL_DIR :=
-LATINIME_HOST_OSNAME :=
endif
diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk
index 622a9f171..510f18c4e 100644
--- a/tools/dicttool/NativeLib.mk
+++ b/tools/dicttool/NativeLib.mk
@@ -13,10 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
-LATINIME_HOST_OSNAME := $(shell uname -s)
-ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
-
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -30,9 +26,6 @@ ifeq ($(FLAG_DBG), true)
endif #FLAG_DBG
LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function
-ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),)
-LOCAL_MULTILIB := 64
-endif #HOST_JDK_IS_64BIT_VERSION
LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni
LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src
@@ -48,9 +41,6 @@ LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME)
include $(BUILD_HOST_SHARED_LIBRARY)
-endif # Darwin - TODO: Remove this
-
# Clear our private variables
include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk
LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
-LATINIME_HOST_OSNAME :=