rules_swift icon indicating copy to clipboard operation
rules_swift copied to clipboard

swift_c_module and remote cache

Open PhilCai1993 opened this issue 1 year ago • 0 comments

I'm a little curious, when using swift_c_module, the .pcm files emitted by swiftc would store some absolute paths, like the path of the modulemap, or the path of Xcode SDK, etc.

When we are attempting to use bazel remote cache, the pcm files will be shared accross different machines, if possible.

But the absolute paths might break the build.

For example, Mac_1 produces Foo.pcm, and there might be some absolute paths inside it, like /Users/**Mac_1**/Xcode.app/..... If another Mac_2 gets the Foo.pcm using remote cache(Since the inputs are the same), and loads the Foo.pcm using -fmodule-file=Foo.pcm, it will fail to build.

Am I right?

PhilCai1993 avatar Aug 08 '24 03:08 PhilCai1993