Skip to content

Conversation

@cachemeifyoucan
Copy link
Contributor

A follow-up to #1557 that when caching is enabled and using the scanner prefix mapping option to canonicalize the path, make sure the path passed via -file-compilation-dir is remapped.

A follow-up to swiftlang#1557 that when caching is enabled and using the scanner
prefix mapping option to canonicalize the path, make sure the path
passed via `-file-compilation-dir` is remapped.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@adrian-prantl
Copy link
Contributor

Is the scanner prefix mapping separate from the debug info prefix mapping? If not, it might be more consistent the have IRGenDebugInfo apply the mapping.

@adrian-prantl
Copy link
Contributor

Otherwise this LGTM

@cachemeifyoucan
Copy link
Contributor Author

Is the scanner prefix mapping separate from the debug info prefix mapping? If not, it might be more consistent the have IRGenDebugInfo apply the mapping.

scannerPrefixMapping remaps all input source files so the rest of swift compiler will not even see the original path at all. It works on the CAS file system level to canonicalize path, so debug info remap should not be used in caching builds (same for clang).

This patch is to remap the path on the command-line, so all paths are consistent in this new remapped file system.

@cachemeifyoucan cachemeifyoucan merged commit 7a2e187 into swiftlang:main Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants