[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM

Nitesh Jain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 18 08:30:38 PDT 2017


nitesh.jain updated this revision to Diff 95573.
nitesh.jain added a comment.

Update diff as per suggestion.


https://reviews.llvm.org/D32125

Files:
  cmake/modules/HandleLLVMOptions.cmake


Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -222,6 +222,12 @@
   endif( LLVM_BUILD_32_BITS )
 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
 
+# If building on a 32-bit system, make sure off_t can store offsets > 2GB
+if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+  add_definitions( -D_LARGEFILE_SOURCE )
+  add_definitions( -D_FILE_OFFSET_BITS=64 )
+endif()
+
 if( XCODE )
   # For Xcode enable several build settings that correspond to
   # many warnings that are on by default in Clang but are


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32125.95573.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170418/b3006cf2/attachment.bin>


More information about the lldb-commits mailing list