From 96092ebd780027ec9e2e1a8c32029e5b54fc970c Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Thu, 27 Mar 2014 19:11:12 +0900 Subject: [PATCH] Use Clang for dicttool Fix the wrong shared lib name too. Change-Id: Ib98c55dfd1aee4a762dc96b12df3a463bef2ac80 --- tools/dicttool/Android.mk | 15 +++++++-------- tools/dicttool/NativeLib.mk | 4 ++-- .../inputmethod/latin/define/JniLibName.java | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk index 0def53e26..f49dee70f 100644 --- a/tools/dicttool/Android.mk +++ b/tools/dicttool/Android.mk @@ -35,7 +35,7 @@ LATINIME_TESTS_SOURCE_DIRECTORY := $(LATINIME_LOCAL_DIR)/tests/src/com/android/i # Dependencies for Dicttool. Most of these files are needed by BinaryDictionary.java. Note that # a significant part of the dependencies are mocked in the compat/ directory, with empty or # nearly-empty implementations, for parts that we don't use in Dicttool. -LATINIME_SRCS_FOR_DICTTOOL := \ +LATINIME_SRC_FILES_FOR_DICTTOOL := \ event/Combiner.java \ event/Event.java \ latin/BinaryDictionary.java \ @@ -57,12 +57,12 @@ LATINIME_SRCS_FOR_DICTTOOL := \ latin/utils/ResizableIntArray.java \ latin/utils/StringUtils.java -LATINIME_TEST_SRCS_FOR_DICTTOOL := \ +LATINIME_TEST_SRC_FILES_FOR_DICTTOOL := \ utils/ByteArrayDictBuffer.java USED_TARGETED_SRCS := \ - $(addprefix $(LATINIME_BASE_SOURCE_DIRECTORY)/, $(LATINIME_SRCS_FOR_DICTTOOL)) \ - $(addprefix $(LATINIME_TESTS_SOURCE_DIRECTORY)/, $(LATINIME_TEST_SRCS_FOR_DICTTOOL)) + $(addprefix $(LATINIME_BASE_SOURCE_DIRECTORY)/, $(LATINIME_SRC_FILES_FOR_DICTTOOL)) \ + $(addprefix $(LATINIME_TESTS_SOURCE_DIRECTORY)/, $(LATINIME_TEST_SRC_FILES_FOR_DICTTOOL)) DICTTOOL_ONDEVICE_TESTS_DIRECTORY := \ $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin/makedict/ @@ -75,12 +75,11 @@ LOCAL_ANNOTATIONS_SRC_FILES := \ LOCAL_SRC_FILES := $(LOCAL_TOOL_SRC_FILES) \ $(filter-out $(addprefix %/, $(notdir $(LOCAL_TOOL_SRC_FILES))), $(LOCAL_MAIN_SRC_FILES)) \ - $(LOCAL_ANNOTATIONS_SRC_FILES) \ + $(call all-java-files-under, $(DICTTOOL_COMPAT_TESTS_DIRECTORY)) \ + $(LOCAL_ANNOTATIONS_SRC_FILES) $(USED_TARGETED_SRCS) \ $(LATINIME_BASE_SOURCE_DIRECTORY)/latin/Constants.java \ $(call all-java-files-under, tests) \ - $(call all-java-files-under, $(DICTTOOL_ONDEVICE_TESTS_DIRECTORY)) \ - $(call all-java-files-under, $(DICTTOOL_COMPAT_TESTS_DIRECTORY)) \ - $(USED_TARGETED_SRCS) + $(call all-java-files-under, $(DICTTOOL_ONDEVICE_TESTS_DIRECTORY)) LOCAL_JAVA_LIBRARIES := junit LOCAL_ADDITIONAL_DEPENDENCIES := $(LATINIME_HOST_NATIVE_LIBNAME) diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk index 95f767dc9..0d3507be3 100644 --- a/tools/dicttool/NativeLib.mk +++ b/tools/dicttool/NativeLib.mk @@ -37,9 +37,9 @@ endif #HOST_JDK_IS_64BIT_VERSION LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated LOCAL_NO_DEFAULT_COMPILER_FLAGS := true +LOCAL_CLANG := true # For C++11 -# TODO: Change this to -std=c++11 -LOCAL_CFLAGS += -std=gnu++0x +LOCAL_CFLAGS += -std=c++11 LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java index c68bdaabf..d6d5e2d61 100644 --- a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java +++ b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java @@ -21,5 +21,5 @@ public final class JniLibName { // This class is not publicly instantiable. } - public static final String JNI_LIB_NAME = "latinime-dicttool-host"; + public static final String JNI_LIB_NAME = "latinime-aosp-dicttool-host"; }