Flags common for native tests
With the CL, "include $(BUILD_NATIVE_TEST)" to build native test; "include $(BUILD_HOST_NATIVE_TEST)" to build a host native test. Change-Id: Icdbbcf906cd4c5c35e65962897490052cd051102
This commit is contained in:
@@ -70,6 +70,8 @@ BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk
|
||||
BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk
|
||||
BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
|
||||
BUILD_KEY_CHAR_MAP := $(BUILD_SYSTEM)/key_char_map.mk
|
||||
BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
|
||||
BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
|
||||
|
||||
# ###############################################################
|
||||
# Parse out any modifier targets.
|
||||
|
@@ -237,6 +237,7 @@ TARGET_OUT_DATA_KEYLAYOUT := $(TARGET_OUT_KEYLAYOUT)
|
||||
TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
|
||||
TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
|
||||
TARGET_OUT_DATA_STATIC_LIBRARIES:= $(TARGET_OUT_STATIC_LIBRARIES)
|
||||
TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
|
||||
|
||||
TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
|
||||
TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
|
||||
|
14
core/host_native_test.mk
Normal file
14
core/host_native_test.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
################################################
|
||||
## A thin wrapper around BUILD_HOST_EXECUTABLE
|
||||
## Common flags for host native tests are added.
|
||||
################################################
|
||||
|
||||
LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
|
||||
LOCAL_C_INCLUDES += \
|
||||
bionic/libstdc++/include \
|
||||
external/gtest/include \
|
||||
external/astl/include
|
||||
LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host libastl_host
|
||||
LOCAL_SHARED_LIBRARIES +=
|
||||
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
18
core/native_test.mk
Normal file
18
core/native_test.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
###########################################
|
||||
## A thin wrapper around BUILD_EXECUTABLE
|
||||
## Common flags for native tests are added.
|
||||
###########################################
|
||||
|
||||
LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
|
||||
LOCAL_C_INCLUDES += bionic \
|
||||
bionic/libstdc++/include \
|
||||
external/gtest/include \
|
||||
external/stlport/stlport
|
||||
LOCAL_STATIC_LIBRARIES +=
|
||||
LOCAL_SHARED_LIBRARIES += libstlport
|
||||
|
||||
ifndef LOCAL_MODULE_PATH
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
Reference in New Issue
Block a user