[llvm-bugs] [Bug 27909] New: "--sysroot /" mess up overlaid VFS

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 27 07:02:36 PDT 2016


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: unassignedclangbugs at nondot.org
          Reporter: fs.output at gmail.com
                CC: llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160527/e27cff92/attachment.html>


More information about the llvm-bugs mailing list