Skip to content

[clang importer] The default apinotes path can be in the Platform's S… #75630

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

Closed
wants to merge 1 commit into from

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Aug 1, 2024

…DK instead of runtime resource dir

Swift platforms like Android (on a windows host) uses an SDK that's split from compiler's resource directory, and the apinote files like std.apinotes and posix_filesystem.apinotes are located in the SDK. This change thus makes the clang importer check to see if the api notes are located in the runtime resource directory, or in the SDK.

…DK instead of runtime resource dir

Swift platforms like Android (on a windows host) uses an SDK that's split for compiler's resource directory, and the apinote files like std.apinotes and posix_filesystem.apinotes are located in the SDK. This change thus makes the clang importer check to see if the api notes are located in the runtime resource directory, or the SDK
@hyp
Copy link
Contributor Author

hyp commented Aug 1, 2024

will add a test too.

llvm::sys::path::get_separator() +
"apinotes").str();
auto vfs = ctx.SourceMgr.getFileSystem();
if (!vfs->exists(apiNotesPath)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the path exists, I think that is okay, and we should just be doing a second additional path.

@finagolfin
Copy link
Member

Seems the same as #75635?

@hyp
Copy link
Contributor Author

hyp commented Aug 5, 2024

closing in favor of @compnerd 's PR

@hyp hyp closed this Aug 5, 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