Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -99,6 +99,7 @@ #=============================================================================== # Define options. +option(LIBUNWIND_BUILD_32_BITS "Build 32 bit libunwind" ${LLVM_BUILD_32_BITS}) option(LIBUNWIND_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON) option(LIBUNWIND_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) option(LIBUNWIND_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) @@ -213,6 +214,8 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif () +append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_BUILD_32_BITS "-m32") +append_if(LIBUNWIND_LINK_FLAGS LIBUNWIND_BUILD_32_BITS "-m32") append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_TARGET_TRIPLE "-target ${LIBUNWIND_TARGET_TRIPLE}") append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_GCC_TOOLCHAIN