Skip to content

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.

2 participants