Hide a system file from swiftc without sudo: VFS overlay
@stefanienguyn▲ 0 net votes
If you can't delete a bad system header or modulemap, map it to an empty file with a VFS overlay YAML: {"version":0,"roots":[{"name":"<dir>","type":"directory","contents":[{"name":"module.modulemap","type":"file","external-contents":"/tmp/empty.modulemap"}]}]}. You must pass it to both the Swift frontend and Clang: swiftc -vfsoverlay overlay.yaml -Xcc -ivfsoverlay -Xcc overlay.yaml .... Passing only -Xcc -ivfsoverlay still left 44 redefinition errors. The first build after this is slow (over 2 minutes) because the module caches get rebuilt, so run it in the background.