2012-08-15 00:32:42 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2012 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2012-09-01 04:52:15 +02:00
|
|
|
#
|
|
|
|
|
2012-08-15 00:32:42 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2016-08-12 23:25:50 +02:00
|
|
|
# TODO(dimitry): replace with define once https://android-review.googlesource.com/247466 is reverted
|
|
|
|
# https://github.com/google/kati/issues/83 is currently blocking it.
|
|
|
|
|
2016-08-11 03:54:06 +02:00
|
|
|
# Move prebuilt test elf-files to $(TARGET_OUT_NATIVE_TESTS)
|
2016-08-15 19:27:47 +02:00
|
|
|
bionic_tests_module := libtest_invalid-rw_load_segment.so
|
2016-08-13 01:53:34 +02:00
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
2016-08-13 00:28:42 +02:00
|
|
|
|
2016-08-15 19:27:47 +02:00
|
|
|
bionic_tests_module := libtest_invalid-unaligned_shdr_offset.so
|
2016-08-13 01:53:34 +02:00
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
2016-08-13 00:28:42 +02:00
|
|
|
|
2016-08-15 19:27:47 +02:00
|
|
|
bionic_tests_module := libtest_invalid-zero_shentsize.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
|
|
|
bionic_tests_module := libtest_invalid-zero_shstrndx.so
|
2016-08-13 01:53:34 +02:00
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
2016-08-11 03:54:06 +02:00
|
|
|
|
2016-08-15 20:30:45 +02:00
|
|
|
bionic_tests_module := libtest_invalid-empty_shdr_table.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
2016-08-15 22:40:53 +02:00
|
|
|
bionic_tests_module := libtest_invalid-zero_shdr_table_offset.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
2016-08-15 23:06:04 +02:00
|
|
|
bionic_tests_module := libtest_invalid-zero_shdr_table_content.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
2016-10-19 20:00:28 +02:00
|
|
|
bionic_tests_module := libtest_invalid-textrels.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
|
|
|
bionic_tests_module := libtest_invalid-textrels2.so
|
|
|
|
include $(LOCAL_PATH)/Android.build.prebuilt.mk
|
|
|
|
|
2013-12-21 03:43:21 +01:00
|
|
|
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
|
|
|
build_host := true
|
|
|
|
else
|
|
|
|
build_host := false
|
|
|
|
endif
|
|
|
|
|
2014-06-11 04:46:07 +02:00
|
|
|
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
2014-04-23 00:22:25 +02:00
|
|
|
|
2014-10-03 22:46:42 +02:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Compile time tests.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# Some of these are intentionally using = instead of := since we need access to
|
|
|
|
# some variables not initialtized until we're in the build system.
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := \
|
|
|
|
$(LOCAL_PATH)/Android.mk \
|
|
|
|
$(LOCAL_PATH)/file-check-cxx \
|
|
|
|
| $(HOST_OUT_EXECUTABLES)/FileCheck$(HOST_EXECUTABLE_SUFFIX) \
|
|
|
|
|
|
|
|
LOCAL_CXX = $(LOCAL_PATH)/file-check-cxx \
|
|
|
|
$(HOST_OUT_EXECUTABLES)/FileCheck \
|
2015-07-21 03:51:30 +02:00
|
|
|
$($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CXX) \
|
2014-10-03 22:46:42 +02:00
|
|
|
GCC \
|
|
|
|
|
|
|
|
LOCAL_CLANG := false
|
|
|
|
LOCAL_MODULE := bionic-compile-time-tests-g++
|
2017-11-16 20:36:56 +01:00
|
|
|
LOCAL_CPPFLAGS := -Wall -Werror
|
2015-09-25 23:42:07 +02:00
|
|
|
# Disable color diagnostics so the warnings output matches the source
|
2017-02-09 09:00:31 +01:00
|
|
|
LOCAL_CPPFLAGS += -fdiagnostics-color=never
|
2017-10-31 19:22:47 +01:00
|
|
|
LOCAL_SRC_FILES := fortify_filecheck_diagnostics_test.cpp
|
2014-10-03 22:46:42 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := \
|
|
|
|
$(LOCAL_PATH)/Android.mk \
|
|
|
|
$(LOCAL_PATH)/file-check-cxx \
|
|
|
|
| $(HOST_OUT_EXECUTABLES)/FileCheck$(HOST_EXECUTABLE_SUFFIX) \
|
|
|
|
|
|
|
|
LOCAL_CXX := $(LOCAL_PATH)/file-check-cxx \
|
|
|
|
$(HOST_OUT_EXECUTABLES)/FileCheck \
|
|
|
|
$(LLVM_PREBUILTS_PATH)/clang++ \
|
|
|
|
CLANG \
|
|
|
|
|
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_MODULE := bionic-compile-time-tests-clang++
|
2017-11-16 20:36:56 +01:00
|
|
|
LOCAL_CPPFLAGS := -Wall -Werror
|
2017-02-09 09:00:31 +01:00
|
|
|
LOCAL_CPPFLAGS += -fno-color-diagnostics -ferror-limit=10000
|
2017-10-31 19:22:47 +01:00
|
|
|
LOCAL_SRC_FILES := fortify_filecheck_diagnostics_test.cpp
|
2014-10-03 22:46:42 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
2014-04-23 04:21:32 +02:00
|
|
|
endif # linux-x86
|
2013-09-06 16:43:27 +02:00
|
|
|
|
2014-06-03 01:29:00 +02:00
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|