Skip to content

Commit

Permalink
libcxxabi: Compile exception handling when enbale CONFIG_CXX_EXCEPTION.
Browse files Browse the repository at this point in the history
Signed-off-by: cuiziwei <[email protected]>
  • Loading branch information
cuiziweizw committed Sep 27, 2024
1 parent 1ce6d26 commit 70a95b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libs/libxx/libcxxabi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ list(APPEND SRCS stdlib_exception.cpp stdlib_new_delete.cpp
# Internal files
list(APPEND SRCS abort_message.cpp fallback_malloc.cpp private_typeinfo.cpp)

# Always compile libcxxabi with exception
list(APPEND SRCS cxa_exception.cpp cxa_personality.cpp)
target_compile_options(libcxxabi PRIVATE -fexceptions)
if(CONFIG_CXX_EXCEPTION)
list(APPEND SRCS cxa_exception.cpp cxa_personality.cpp)
endif()

if(CONFIG_LIBCXXABI)
add_compile_definitions(LIBCXX_BUILDING_LIBCXXABI)
Expand Down
4 changes: 2 additions & 2 deletions libs/libxx/libcxxabi.defs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ CPPSRCS += stdlib_exception.cpp stdlib_new_delete.cpp stdlib_stdexcept.cpp stdli
# Internal files
CPPSRCS += abort_message.cpp fallback_malloc.cpp private_typeinfo.cpp

# Always compile libcxxabi with exception
ifeq ($(CONFIG_CXX_EXCEPTION),y)
CPPSRCS += cxa_exception.cpp cxa_personality.cpp
CXXFLAGS += -fexceptions
endif

# Fix compilation error on ARM32:
# libcxxabi/src/cxa_personality.cpp:594:22: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope
Expand Down

0 comments on commit 70a95b8

Please sign in to comment.