From a70a76d7dd5db56b5924047f94fc92d36e3db07d Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Mon, 22 Jul 2013 15:51:14 -0700 Subject: 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 --- lib/Support/MemoryBuffer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/Support/MemoryBuffer.cpp') 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) -- cgit v1.2.3-18-g5258