Skip to content

🍒[Clang][Driver] Fix include paths for --sysroot / on Linux #4762

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
merged 1 commit into from
May 27, 2022

Conversation

egorzhdan
Copy link

Currently if --sysroot / is passed to the Clang driver, the include paths generated by the Clang driver will start with a double slash: //usr/include/....
If VFS is used to inject files into the include paths (for example, the Swift compiler does this), VFS will get confused and the injected files won't be visible.

This change makes sure that the include paths start with a single slash.

Fixes llvm#28283.

Differential Revision: https://reviews.llvm.org/D126289

Currently if `--sysroot /` is passed to the Clang driver, the include paths generated by the Clang driver will start with a double slash: `//usr/include/...`.
 If VFS is used to inject files into the include paths (for example, the Swift compiler does this), VFS will get confused and the injected files won't be visible.

This change makes sure that the include paths start with a single slash.

Fixes llvm#28283.

Differential Revision: https://reviews.llvm.org/D126289
@egorzhdan egorzhdan requested review from hyp and zoecarver May 27, 2022 16:43
@egorzhdan egorzhdan merged commit 1b98795 into stable/20220421 May 27, 2022
@egorzhdan egorzhdan deleted the egorzhdan/linux-sysroot-slash_20220421 branch May 27, 2022 19:02
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.

1 participant