[llvm] r301171 - [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM.
Nitesh Jain via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 03:36:46 PDT 2017
Author: nitesh.jain
Date: Mon Apr 24 05:36:46 2017
New Revision: 301171
URL: http://llvm.org/viewvc/llvm-project?rev=301171&view=rev
Log:
[LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM.
Reviewers: beanz
Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste
Differential Revision: https://reviews.llvm.org/D32125
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=301171&r1=301170&r2=301171&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Mon Apr 24 05:36:46 2017
@@ -222,6 +222,13 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT
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
More information about the llvm-commits
mailing list