[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
nitesh.jain added a comment. In https://reviews.llvm.org/D32125#736543, @sdardis wrote: > Hi Nitesh, > > this commit broke clang-cmake-mips. Can you investigate? > > http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/3189 > > Thanks, > Simon Hi Simon, The assertion has been fixed. Thanks Repository: rL LLVM https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
sdardis added a comment. Hi Nitesh, this commit broke clang-cmake-mips. Can you investigate? http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/3189 Thanks, Simon Repository: rL LLVM https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
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=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 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 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
nitesh.jain added a comment. In https://reviews.llvm.org/D32125#734500, @emaste wrote: > In https://reviews.llvm.org/D32125#728166, @krytarowski wrote: > > > Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms > > 20+ years ago. > > > > It's perhaps no-op, but it might be noted in the commit message what > > platforms are supposed to be improved. > > > I'd say it's better to put a comment in the source where it's set. Added comment in the source. https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
emaste added a comment. In https://reviews.llvm.org/D32125#728166, @krytarowski wrote: > Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms 20+ > years ago. > > It's perhaps no-op, but it might be noted in the commit message what > platforms are supposed to be improved. I'd say it's better to put a comment in the source where it's set. https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. This looks good to me. https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
nitesh.jain added a comment. In https://reviews.llvm.org/D32125#728166, @krytarowski wrote: > Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms 20+ > years ago. > > It's perhaps no-op, but it might be noted in the commit message what > platforms are supposed to be improved. Yes. https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
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 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 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
beanz added a comment. Can you please move this check into `HandleLLVMOptions.cmake`? By putting it into a module that is vended as part of LLVM's packaging then LLVM subprojects can have consistent settings when building out-of-tree. This would enable @zturner's request to remove the duplicated code from LLDB. Repository: rL LLVM https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
We already have this exact code in lldb/cmake/LLDBConfig.txt. This fix looks fine, but I see no reason to have it twice, so can you delete the LLDB version? On Mon, Apr 17, 2017 at 7:01 AM Kamil Rytarowski via Phabricator < revi...@reviews.llvm.org> wrote: > krytarowski added a comment. > > Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms > 20+ years ago. > > It's perhaps no-op, but it might be noted in the commit message what > platforms are supposed to be improved. > > > Repository: > rL LLVM > > https://reviews.llvm.org/D32125 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
krytarowski added a comment. Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms 20+ years ago. It's perhaps no-op, but it might be noted in the commit message what platforms are supposed to be improved. Repository: rL LLVM https://reviews.llvm.org/D32125 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM
nitesh.jain created this revision. Herald added subscribers: arichardson, mgorny. Fix is to define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64. This fix will cause llvm::sys::fs::file_size() to return correct object size. Repository: rL LLVM https://reviews.llvm.org/D32125 Files: CMakeLists.txt Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeLists.txt @@ -458,6 +458,12 @@ option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) endif() +# 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() + # Define the default arguments to use with 'lit', and an option for the user to # override. set(LIT_ARGS_DEFAULT "-sv") Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeLists.txt @@ -458,6 +458,12 @@ option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) endif() +# 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() + # Define the default arguments to use with 'lit', and an option for the user to # override. set(LIT_ARGS_DEFAULT "-sv") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits