https://llvm.org/bugs/show_bug.cgi?id=27909

            Bug ID: 27909
           Summary: "--sysroot /" mess up overlaid VFS
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Virtual file system cannot find overlaid file if "--sysroot /" is specified.

Way to reproduce:
$ cat overlay.yml
{
    "version": 0,
    "use-external-names": false,
    "roots": [
        {
            "type": "file",
            "name": "/usr/include/stdio_vfs.h",
            "external-contents": "/usr/include/stdio.h"
        }
    ]
}
$ cat foo.c
#include <stdio_vfs.h>
int main() {
    printf("foo");
}
$ clang -ivfsoverlay overlay.yml foo.c  # NO PROBLEM
$ clang --sysroot / -ivfsoverlay overlay.yml foo.c
foo.c:1:10: fatal error: 'stdio_vfs.h' file not found
#include <stdio_vfs.h>
         ^
1 error generated.
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to