EricWF created this revision.
EricWF added reviewers: rmaprath, compnerd, jroelofs.
EricWF added a subscriber: cfe-commits.

This option defaults to LLVM_BUILD_32_BITS but it allows it to be modified 
separate from the rest of LLVM.

This is intended to help fix PR27959.
(https://llvm.org/bugs/show_bug.cgi?id=27959)

http://reviews.llvm.org/D20881

Files:
  CMakeLists.txt

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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to