From fda0e3c0b86d3f0de03dbd8063e23ea376e309e1 Mon Sep 17 00:00:00 2001 From: Lucas Prates Date: Tue, 8 Oct 2024 13:04:59 +0100 Subject: [PATCH] Disable assertions for libunwind When building the embedded toolchain, we currently disable assertions for libcxxabi, but assertions for libunwind are still enabled. This causes some of the logging functionality from libunwind to be included in the build, which in turn imposes a dependency on IO functionality that might not be available on baremetal environemnts. This patch disables assertions for libunwind using the `-DLIBUNWIND_ENABLE_ASSERTIONS=OFF` option, removing the issue. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf4fd23..bded7c4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1259,6 +1259,7 @@ function( -DLIBCXX_INCLUDE_BENCHMARKS=OFF -DLIBCXX_TEST_PARAMS=executor=${test_executor} -DLIBCXX_SHARED_OUTPUT_NAME="c++-shared" + -DLIBUNWIND_ENABLE_ASSERTIONS=OFF -DLIBUNWIND_ENABLE_SHARED=OFF -DLIBUNWIND_ENABLE_STATIC=ON -DLIBUNWIND_IS_BAREMETAL=ON