summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 39d6bb18ce76..2edbcadb3d7f 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -130,6 +130,12 @@ _c_flags += $(if $(patsubst n%,, \
$(CFLAGS_KASAN))
endif
+ifeq ($(CONFIG_UBSAN),y)
+_c_flags += $(if $(patsubst n%,, \
+ $(UBSAN_SANITIZE_$(basetarget).o)$(UBSAN_SANITIZE)$(CONFIG_UBSAN_SANITIZE_ALL)), \
+ $(CFLAGS_UBSAN))
+endif
+
# If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').