File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,10 @@ endforeach()
96
96
# RTTI is required for building the libcxxabi library
97
97
target_compile_options (libcxxabi PRIVATE -frtti )
98
98
99
+ if (CONFIG_SIM_UBSAN OR CONFIG_MM_UBSAN )
100
+ target_compile_options (libcxxabi PRIVATE -fno-sanitize=vptr )
101
+ endif ()
102
+
99
103
target_sources (libcxxabi PRIVATE ${TARGET_SRCS} )
100
104
target_compile_options (libcxxabi PRIVATE -frtti )
101
105
target_include_directories (
Original file line number Diff line number Diff line change 47
47
ifeq ($(CONFIG_LIBCXXABI), y)
48
48
CXXFLAGS += ${DEFINE_PREFIX}LIBCXX_BUILDING_LIBCXXABI
49
49
CXXFLAGS += -I $(TOPDIR)/libs/libxx/libcxxabi/include
50
+
51
+ # Disable dynamic type checking when enabling libcxxabi
52
+ # It results in a recursive call:
53
+ # cxxabiv1::__dynamic_case -> is_equal -> __ubsan::checkDynamic -> cxxabiv1::__dynamic_case
54
+
55
+ ifneq ($(CONFIG_SIM_UBSAN)${CONFIG_MM_UBSAN},)
56
+ CXXFLAGS += -fno-sanitize=vptr
57
+ endif
50
58
endif
51
59
52
60
# C++ABI files
You can’t perform that action at this time.
0 commit comments