spotify / XCRemoteCache

Other
830 stars 53 forks source link

Parse vfs overlay file #70

Closed polac24 closed 2 years ago

polac24 commented 2 years ago

Part I of the Virtual File System Support

Problem:

When dynamic libraries are built in parallel, Xcode provides a mapping for virtual file system (-vfsoverlay argument) because some dependency files may not be ready yet, e.g. prepared .framework and compilers should look into "temporary" locations. Because these temporary locations are reported as dependencies, their absolute paths might leak to a meta json. Reported in #59

Solution

In XCRemoteCache, we can respect overlay mappings and every time swiftc or clang compilers report a dependency on a file from an overlay, we can map it to the "final" destination. The first step is to read the json file that Xcode generates.

Screenshot 2022-02-04 at 22 16 04