am 07607526: am 63082eab: am b6874440: Merge "Add support for a partial ubsan build."

* commit '07607526b8701f471869aecbd89fe4ea1990251e':
  Add support for a partial ubsan build.
This commit is contained in:
Dan Albert
2015-04-17 20:14:13 +00:00
committed by Android Git Automerger
2 changed files with 34 additions and 4 deletions

View File

@@ -100,6 +100,32 @@ CLANG_CONFIG_TARGET_EXTRA_CFLAGS := -nostdlibinc
CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS := -nostdlibinc
CLANG_CONFIG_TARGET_EXTRA_LDFLAGS :=
CLANG_DEFAULT_UB_CHECKS := \
bool \
integer-divide-by-zero \
return \
returns-nonnull-attribute \
shift-exponent \
unreachable \
vla-bound \
# TODO(danalbert): The following checks currently have compiler performance
# issues.
# CLANG_DEFAULT_UB_CHECKS += alignment
# CLANG_DEFAULT_UB_CHECKS += bounds
# CLANG_DEFAULT_UB_CHECKS += enum
# CLANG_DEFAULT_UB_CHECKS += float-cast-overflow
# CLANG_DEFAULT_UB_CHECKS += float-divide-by-zero
# CLANG_DEFAULT_UB_CHECKS += nonnull-attribute
# CLANG_DEFAULT_UB_CHECKS += null
# CLANG_DEFAULT_UB_CHECKS += shift-base
# CLANG_DEFAULT_UB_CHECKS += signed-integer-overflow
# TODO(danalbert): Fix UB in libc++'s __tree so we can turn this on.
# https://llvm.org/PR19302
# http://reviews.llvm.org/D6974
# CLANG_DEFAULT_UB_CHECKS += object-size
# HOST config
clang_2nd_arch_prefix :=
include $(BUILD_SYSTEM)/clang/HOST_$(HOST_ARCH).mk