Issue 169768
Summary [Modules] Clang modules require header files to be present even when using precompiled modules
Labels
Assignees
Reporter atetubou
    This is derived from https://issues.chromium.org/423815877

We see include not found error in clang modules build when we don't send header files to remote workers even if the header is given as Clang modules and with `-fmodules-embed-all-files`.
So I'm wondering why clang still requires header files to be there even if those files are included in given module file?

This reproduces with the following script.

```sh
cat > module.modulemap <<<"""
module A {
  header \"A.h\"
}
"""

touch A.h

cat > A.c <<<"""
#include \"A.h\"
"""

clang -cc1 -emit-module -o A.pcm -fmodules module.modulemap -fmodules-embed-all-files -fmodule-name=A
clang -cc1 -emit-obj A.c -fmodules -fmodule-map-file=module.modulemap -fmodule-file=A.pcm

rm A.h

# This compile failed with: 'A.h' file not found
clang -cc1 -emit-obj A.c -fmodules -fmodule-map-file=module.modulemap -fmodule-file=A.pcm
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to