Skip to content

Commit 0032fae

Browse files
committedApr 24, 2017
[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 llvm-svn: 301171
1 parent ca53211 commit 0032fae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎llvm/cmake/modules/HandleLLVMOptions.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
222222
endif( LLVM_BUILD_32_BITS )
223223
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
224224

225+
# If building on a GNU specific 32-bit system, make sure off_t is 64 bits
226+
# so that off_t can stored offset > 2GB
227+
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
228+
add_definitions( -D_LARGEFILE_SOURCE )
229+
add_definitions( -D_FILE_OFFSET_BITS=64 )
230+
endif()
231+
225232
if( XCODE )
226233
# For Xcode enable several build settings that correspond to
227234
# many warnings that are on by default in Clang but are

0 commit comments

Comments
 (0)
Please sign in to comment.