9a2741010a
Chrome OS has a fairly extensive FORTIFY test suite for both compile-time and run-time diagnostics. It covers tons of edge cases, and conveniently centralizes diagnostic and death testing. A fair amount of it has been ifdef'ed out, since Bionic doesn't yet diagnose (or crash on) some of these things. The intent is to explicitly declare defeat on the things we don't care to FORTIFY, and slowly fix the rest in easier-to-digest CLs. Once that's done, we might be able to look into retiring some of the FORTIFY testing that we don't share with the CrOS folks. Bug: 131861088 Test: mma + bionic-unit-tests on blueline Change-Id: I16734ea0769e03cf658ef10532d64f28fdb36a89
20 lines
640 B
Makefile
20 lines
640 B
Makefile
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := \
|
|
$(LOCAL_PATH)/Android.mk \
|
|
$(LOCAL_PATH)/touch-obj-on-success
|
|
|
|
LOCAL_CXX := $(LOCAL_PATH)/touch-obj-on-success \
|
|
$(LLVM_PREBUILTS_PATH)/clang++ \
|
|
|
|
LOCAL_CLANG := true
|
|
LOCAL_MODULE := bionic-compile-time-tests$(FORTIFY_LEVEL)-clang++
|
|
LOCAL_CPPFLAGS := -Wall -Wno-error
|
|
LOCAL_CPPFLAGS += -fno-color-diagnostics -ferror-limit=10000 -Xclang -verify
|
|
LOCAL_CPPFLAGS += -DCOMPILATION_TESTS=1 -Wformat-nonliteral
|
|
LOCAL_CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=$(FORTIFY_LEVEL)
|
|
LOCAL_SRC_FILES := clang_fortify_tests.cpp
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
FORTIFY_LEVEL :=
|