aboutsummaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorEli Bendersky <eliben@chromium.org>2013-07-22 15:51:14 -0700
committerEli Bendersky <eliben@chromium.org>2013-07-22 15:51:14 -0700
commita70a76d7dd5db56b5924047f94fc92d36e3db07d (patch)
tree1282cfb9c3cfb01c4023593abf3f352825ad49c1 /lib/Support
parent87de224b6e7018ddb83e28e29617ce4f4b910927 (diff)
Unbreak the Windows/Cygwin toolchain build after the 3.3 merge.
Post 3.3-merge there seems to be a problem using mmap on cygwin. In the meantime, as a LOCALMOD, we disable usage of mmap in MemoryBuffer. The effect of this on the Windows/Cygwin toolchain can be a slightly slower developer-side linkage time. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3578 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/19923003
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/MemoryBuffer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 7a8b0ecd3d..75e0ed42a2 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -293,6 +293,15 @@ static bool shouldUseMmap(int FD,
int64_t Offset, // @LOCALMOD (?)
bool RequiresNullTerminator,
int PageSize) {
+ // @LOCALMOD-BEGIN
+ // Post 3.3-merge there seems to be a problem using mmap on cygwin. In the
+ // meantime, as a LOCALMOD, we disable usage of mmap in MemoryBuffer. The
+ // effect of this on the Windows/Cygwin toolchain can be a slightly slower
+ // developer-side linkage time.
+#if defined(__CYGWIN__)
+ return false;
+#endif
+ // @LOCALMOD-END
// We don't use mmap for small files because this can severely fragment our
// address space.
if (MapSize < 4096*4)