aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-02-20 13:00:09 -0800
committerJan Voung <jvoung@chromium.org>2013-02-20 13:00:09 -0800
commit064cb04294ad612d84a99ac111b06b4544e6899c (patch)
treed5f8d2b162477632a283bff7fde8b578b5c69254
parent51a313f11b9f37f93e74c88d7e2adb45d6a2358d (diff)
Explicitly set a buffer size for sandboxed llc's objfile.
Otherwise it is "buffered", but the buffer size is 0. Unbuffered writes add 1 second of sys time to translation time of gcc. With a large buffer, sys time is again near 0. BUG= http://code.google.com/p/nativeclient/issues/detail?id=3315 Review URL: https://codereview.chromium.org/12317019
-rw-r--r--tools/llc/llc.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 1d7295c303..bdc14fc554 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -504,6 +504,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
#if defined __native_client__ && defined(NACL_SRPC)
{
raw_fd_ostream ROS(GetObjectFileFD(), true);
+ ROS.SetBufferSize(1 << 20);
formatted_raw_ostream FOS(ROS);
// Ask the target to add backend passes as necessary.
if (Target.addPassesToEmitFile(*PM, FOS, FileType, NoVerify)) {