[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

Ivan Donchevskii via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 01:34:51 PST 2018


yvvan marked an inline comment as done.
yvvan added inline comments.


================
Comment at: lib/Support/MemoryBuffer.cpp:42
 
+static bool MemoryMappingEnabled = true;
+
----------------
lebedev.ri wrote:
> Such global flags are a bad idea in general, and really not great in LLVM's case.
> The editor would set it for "it's" llvm, but that will also affect the LLVM that is used by e.g. mesa.
> 
Oh no, don't mention mesa. The proper client should never share it's LLVM layer with mesa. We already got issues with versions incompatibility and the only good solution is to link llvm statically inside client. Otherwise mesa causes the mess anyways.

Also I expect this setter to be used only on Windows.

Of course there's another solution is that Ilya proposed but it's only for clangd there and is bigger in code size. And it can still allow bugs if somebody uses MemoryBuffer not through the FileSystem class.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54995/new/

https://reviews.llvm.org/D54995





More information about the cfe-commits mailing list