Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix libxx sub repo build error with layout changed #131

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libs/libxx/libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ if(CONFIG_LIBCXX)
add_compile_definitions(__GLIBCXX__)
endif()

if(CONFIG_LIBCXXABI)
add_compile_definitions(LIBCXX_BUILDING_LIBCXXABI)
endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
Expand Down
11 changes: 9 additions & 2 deletions libs/libxx/libcxxabi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ if(CONFIG_LIBCXXABI)
cxa_thread_atexit.cpp
cxa_vector.cpp
cxa_virtual.cpp)
add_compile_definitions(_LIBCPP_BUILDING_LIBRARY)
if(CONFIG_LIBSUPCXX_TOOLCHAIN)
add_compile_definitions(__GLIBCXX__)
endif()

if(CONFIG_LIBSUPCXX)
add_compile_definitions(__GLIBCXX__)
endif()
# C++ STL files
list(APPEND SRCS stdlib_exception.cpp stdlib_new_delete.cpp
stdlib_stdexcept.cpp stdlib_typeinfo.cpp)
Expand Down Expand Up @@ -121,6 +128,6 @@ if(CONFIG_LIBCXXABI)

target_sources(libcxxabi PRIVATE ${TARGET_SRCS})
target_include_directories(
libcxxabi BEFORE PRIVATE ${CMAKE_CURRENT_LIST_DIR}/libcxxabi/include
${CMAKE_CURRENT_LIST_DIR}/libcxx/src)
libcxxabi BEFORE PRIVATE ${NUTTX_DIR}/libs/libxx/libcxx/libcxx/src
${CMAKE_CURRENT_LIST_DIR}/libcxxabi/include)
endif()
1 change: 1 addition & 0 deletions libs/libxx/libstdc++/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/libstdc++/
Loading