Skip to content

Compute and append -file-compilation-dir when -g options are used #1557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cachemeifyoucan
Copy link
Contributor

SwiftDriver should compute -file-compilation-dir when debug info is used. This can avoid swift-frontend to compute its own compilation directory, which can cause swift-frontend to generate different code with the same command if current working directory changed.

SwiftDriver should compute `-file-compilation-dir` when debug info is
used. This can avoid `swift-frontend` to compute its own compilation
directory, which can cause `swift-frontend` to generate different code
with the same command if current working directory changed.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan merged commit 97c24cc into swiftlang:main Mar 12, 2024
cachemeifyoucan added a commit to cachemeifyoucan/swift-driver that referenced this pull request Mar 12, 2024
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.
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.

2 participants