[llvm-branch-commits] [libunwind] 5f46db7 - Add CMake option for configuring libunwind bare-metal build
Konstantin Schwarz via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 9 08:39:41 PDT 2021
Author: Konstantin Schwarz
Date: 2019-01-17T12:37:40+01:00
New Revision: 5f46db7c176433d7a81ed06e66dd5f3c4a4cae14
URL: https://github.com/llvm/llvm-project/commit/5f46db7c176433d7a81ed06e66dd5f3c4a4cae14
DIFF: https://github.com/llvm/llvm-project/commit/5f46db7c176433d7a81ed06e66dd5f3c4a4cae14.diff
LOG: Add CMake option for configuring libunwind bare-metal build
Added:
Modified:
libunwind/CMakeLists.txt
Removed:
################################################################################
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index e460a72d45c07..a49e482807e7d 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -134,6 +134,7 @@ option(LIBUNWIND_ENABLE_ARM_WMMX "Enable unwinding support for ARM WMMX register
option(LIBUNWIND_ENABLE_THREADS "Build libunwind with threading support." ON)
option(LIBUNWIND_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
option(LIBUNWIND_INCLUDE_DOCS "Build the libunwind documentation." ${LLVM_INCLUDE_DOCS})
+option(LIBUNWIND_BAREMETAL "Build libunwind for baremetal targets." OFF)
set(LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
"Define suffix of library directory name (32/64)")
@@ -332,6 +333,10 @@ if (WIN32 AND LIBUNWIND_ENABLE_STATIC AND NOT LIBUNWIND_ENABLE_SHARED)
add_definitions(-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS)
endif()
+if (LIBUNWIND_BAREMETAL)
+ list(APPEND LIBUNWIND_COMPILE_FLAGS -D_LIBUNWIND_IS_BAREMETAL)
+endif()
+
#===============================================================================
# Setup Source Code
#===============================================================================
More information about the llvm-branch-commits
mailing list