[PATCH] D51568: [modules] Add `-fdisable-module-directory` flag for relocatable modules

Andrew Gallagher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 1 00:56:23 PDT 2018


andrewjcg added a comment.

I'm not sure this is the best approach, but I wasn't sure of a better one (to support module files w/o absolute paths).  Another approach I tried, was relativizing the other input files (from outside the module directory) using chains of `../` (e.g. `../../../../../other/modules/module.modulemap`), but this causes issues when symlinks appear in the module directory path.  Another potential option could be to add a bit to the serialized module format for each input, to allow some inputs to mark themselves as relative to the CWD, rather than the module directory.


Repository:
  rC Clang

https://reviews.llvm.org/D51568





More information about the cfe-commits mailing list