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

Nitesh Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 03:49:46 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL301171: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM. (authored by nitesh.jain).

Changed prior to commit:
  https://reviews.llvm.org/D32125?vs=95573&id=96374#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32125

Files:
  llvm/trunk/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
@@ -222,6 +222,13 @@
   endif( LLVM_BUILD_32_BITS )
 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
 
+# If building on a GNU specific 32-bit system, make sure off_t is 64 bits
+# so that off_t can stored offset > 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.96374.patch
Type: text/x-patch
Size: 721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170424/e651b963/attachment.bin>


More information about the llvm-commits mailing list