[llvm-bugs] [Bug 47209] New: -no-canonical-prefixes breaks builtin header resolution when compiling a module using a relative path

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 17 11:07:46 PDT 2020


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

            Bug ID: 47209
           Summary: -no-canonical-prefixes breaks builtin header
                    resolution when compiling a module using a relative
                    path
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: phosek at chromium.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

To reproduce this issue, use the following:

```
$ mkdir -p t/d && cd t
$ cat >module.modulemap <<EOF
module stdint_h [system] {
  header "stdint.h"
  export *
}
EOF
$ # install Clang in t/clang
$ cd d
$ ../clang/bin/clang++ -fmodules -c -x c++ -Xclang -emit-module -c
../module.modulemap -o m.pcm -fmodule-name=stdint_h -no-canonical-prefixes
<module-includes>:1:10: error: '../clang/lib/clang/12.0.0/include/stdint.h'
file not found, did you mean 'clang/lib/clang/12.0.0/include/stdint.h'?
#include "../clang/lib/clang/12.0.0/include/stdint.h"
         ^
1 error generated.
```

If you omit `-no-canonical-prefixes` everything compiles without errors. If you
compile from `t` (not `t/d`) everything compiles without errors, even with
`-no-canonical-prefixes`.

-- 
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/20200817/a8347ce6/attachment-0001.html>


More information about the llvm-bugs mailing list