Merge "Disable unsigned-shift-base by default."

This commit is contained in:
Yabin Cui 2021-01-15 00:17:36 +00:00 committed by Gerrit Code Review
commit 7604390e4c
1 changed files with 10 additions and 0 deletions

View File

@ -441,3 +441,13 @@ ifneq ($(findstring fsanitize,$(my_cflags)),)
endif
endif
endif
# http://b/177566116, libc++ may crash with this sanitizer.
# Disable this check unless it has been explicitly specified.
ifneq ($(findstring fsanitize,$(my_cflags)),)
ifneq ($(findstring integer,$(my_cflags)),)
ifeq ($(findstring sanitize=unsigned-shift-base,$(my_cflags)),)
my_cflags += -fno-sanitize=unsigned-shift-base
endif
endif
endif