https://bugs.llvm.org/show_bug.cgi?id=51395
Bug ID: 51395
Summary: Clang error "file not found" on include files when
building with modules
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Modules
Assignee: unassignedclangb...@nondot.org
Reporter: akhu...@google.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
We saw this "file not found" error when trying to build with -fmodules. This
only happens when we use relative paths in the header search.
To repro:
$ cat t.cc
#include <cstddef>
$ ./<relative-path-to-clang>/clang -fmodules -nostdinc++ -no-canonical-prefixes
-isystem../../llvm-build/include/c++/v1 -E t.cc
# 1 "t.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 385 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "t.cc" 2
<module-includes>:23:10: fatal error:
'../../llvm-build/lib/clang/14.0.0/include/stdint.h' file not found
#include "../../llvm-build/lib/clang/14.0.0/include/stdint.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t.cc:1:10: fatal error: could not build module 'std'
#include <cstddef>
~~~~~~~~^
(also, to repro, I had to remove a line `header "range"` from <build
dir>/include/c++/v1/module.modulemap to get the build to work)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs