module map help - missing cache dir

Hi,

I’m trying to create a module map for the PS4 headers, but find I probably don’t know enough about module maps yet to do so. I’ve read http://clang.llvm.org/docs/Modules.html but haven’t quite digested all the terms yet.

It’s complicated by the fact that the PS4 headers are in three separate directories, with a few circular references, and different teams contribute different headers to the same include directories.

I’m using a generated test bed where a tool creates a tree of C++ source files that each include one of the headers, for a test of a stand-alone build, with a Makefile for building them and also running modularize. The tool uses the same list of files the modularize uses to know which headers to use. The Makefile uses the -fmodules-cache-path option in the builds to point to a directory at the root of the test bed. The Makefile is run with the current directory the root of the test bed.

I tried putting the module.modulemap file in a directory two or more directories above which is the common ancestor of the include directories. Clang seems to find the module.modulemap okay, but doesn’t create the modules cache directory where the -fmodules-cache-path option tells it to. I don’t know where or if it is created elsewhere. There is no message. If I run Clang under the debugger (DevStudio) with the working directory at the same place, the cache directory does get created, so I can’t debug why the behavior is different.

If I change the module.modulemap file to be in one of the include directories, and use relative paths (i.e. …/include_common) in the header directives, it seems to work.

Thanks.

-John