As swift 6.x starts to use different swiftmodule for TypeSystemSwiftTypeRefForExpression when constructing swift ast context, we are required to provide all our swiftmodules to linker with -add-ast-path . with --serialize-debugging-options on.
In this case, the product swiftmodule file will have many local absolute paths in the option_blocks & input_blocks
Currently we are using bazel as our build system, which means we cannot cache these swiftmodule.
I found there is already one swift-frontend command line option -prefix-serialized-debugging-options handling this case.
I think with this option we can map all frontend parameters related to bazel root andbox. We can recover them if needed from lldb side.
Unfortunately, it only handles SDK_NAME, XCC, SEARCH_PATH. The PLUGIN_SEARCH_OPTION related ones are untouched, which makes it not possible to make the swiftmodule cacheable.
And I just checked lldb source code, lldb only use the information in swiftmodule for ClangImporter, these PLUGIN_SEARCH_OPTIONs will not even be used.
Can we make the PLUGIN_SEARCH_OPTION also be mapped using the same way?
4 posts - 2 participants