[PATCH] D39444: [Support] Make the default chunk size of raw_fd_ostream to 1 GiB.

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 19:41:19 PDT 2017


krytarowski added inline comments.


================
Comment at: llvm/lib/Support/raw_ostream.cpp:581
 
-#ifndef LLVM_ON_WIN32
-#if defined(__linux__)
-  bool ShouldWriteInChunks = true;
-#else
-  bool ShouldWriteInChunks = false;
-#endif
-#else
+  // It is observed that Linux returns EINVAL for a very large write (>2G),
+  // so the default write size is limited to 1 GiB.
----------------
Am I looking correctly that we enforce Linux behavior to every UNIX?


https://reviews.llvm.org/D39444





More information about the llvm-commits mailing list