[cfe-dev] [PATCH] [Driver] Add -ivfsoverlay-lib option to load VFS from shared library

Volodymyr Sapsai via cfe-dev cfe-dev at lists.llvm.org
Fri Jun 1 17:50:21 PDT 2018


Hello Andrew,

That is an interesting idea with providing VFS as a shared library. Can you please provide more details about what you are trying to accomplish with custom VFS? It is hard to judge about merits of the approach without knowing the intended usage.

Thanks,
Volodymyr

> On May 28, 2018, at 04:23, Andrew Savonichev via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi,
> 
> Recently I was trying to hijack into clang's file management to do a
> custom pre-processing of input files, and found that VirtualFileSystem
> (VFS) is pretty flexible and can be extended to support any weird
> use-cases related to files: preprocessing, in-memory files, code
> generation, etc.
> 
> Unfortunately, it is not exposed from clang driver, and you have to
> patch clang to add your own custom VFS. Thus I added an option to clang
> cc1 driver that loads a said shared library, gets a VFS and pushes it on
> top of real file system.
> 
> The patch is on the review: https://reviews.llvm.org/D47190
> 
> Any commets/suggestions are welcome.
> 
> -- 
> Andrew
> 
> --------------------------------------------------------------------
> Joint Stock Company Intel A/O
> Registered legal address: Krylatsky Hills Business Park,
> 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> Russian Federation
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list