Is there a way to modify the path section of .swiftmodule file?

Hi, I have a question about swiftmodule file, here is the background.

Our project has many dependencies which are binary file. And these dependencies are build in the remote server. And I found the input block of .swiftmodule file has some problem. In the input block, the serch path is refer to the path of the remote server. Just like '<SEARCH_PATH abbrevid=9 op0=1 op1=0/> blob data = '/Users/remoteserver/builds/A/Pods/B', and this cause a lldb problem. When hit the breakpoint, the lldb will report:

warning: (arm64) /Users/ray/workspace/MainProject/Pods/A.framework/A(SomeObjectFile.o) 0x00001de1: unable to locate module needed for external types: /Users/remoteserver/builds/A/Pods/B

error: '/Users/remoteserver/builds/A/Pods/B' does not exist

Debugging will be degraded due to missing types. Rebuilding the project will regenerate the needed module files.

Anyone has ideas about this?

When building things remotely you have to juggle some flags to use relative paths, instead of absolute paths, in your built artifacts to avoid this. We use bazel for our build system which handles passing the right flags for this, but you can likely do this yourself in Xcode as well. This document explains some of the moving pieces. In general using -debug-prefix-map and -no-serialize-debugging-options gets you a lot of the way there, you may also need to change the -add_ast_path arguments to the linker to be relative paths instead of absolute, which might require wrapping the linker invocation Xcode calls.

Thanks for your reply, I'll give it a try.