mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
e0fe0bbe57
Currently, the top Makefile includes all of scripts/Makefile.<feature> even if the associated CONFIG option is disabled. Do not include unneeded Makefiles in order to slightly optimize the parse stage. Include $(include-y), and ignore $(include-). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
27 lines
1009 B
Makefile
27 lines
1009 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
ifdef CONFIG_UBSAN_ALIGNMENT
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
|
|
endif
|
|
|
|
ifdef CONFIG_UBSAN_BOUNDS
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
|
|
endif
|
|
|
|
ifdef CONFIG_UBSAN_MISC
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=shift)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=enum)
|
|
endif
|
|
|
|
ifdef CONFIG_UBSAN_TRAP
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize-undefined-trap-on-error)
|
|
endif
|
|
|
|
# -fsanitize=* options makes GCC less smart than usual and
|
|
# increase number of 'maybe-uninitialized false-positives
|
|
CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized)
|