Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: src/main.cpp

Issue 969403003: Ignore NaCl st_blksize of 0 and buffer writes to raw_fd_ostream. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/main.cpp
diff --git a/src/main.cpp b/src/main.cpp
index eddb94e256d45fc07049ddf0db5b69ae0a907ae2..4763f3ebcbd1ab52f53198dd1724835ad09a4444 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -340,6 +340,9 @@ int main(int argc, char **argv) {
std::error_code EC;
raw_fd_ostream *FdOs =
new raw_fd_ostream(OutputFilename, EC, sys::fs::F_None);
+ // NaCl sets st_blksize to 0, and LLVM uses that to pick the
+ // default preferred buffer size. Set to something non-zero.
+ FdOs->SetBufferSize(1 << 14);
Os.reset(FdOs);
if (EC) {
*Ls << "Failed to open output file: " << OutputFilename << ":\n"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698