Closed
Description
See https://discourse.llvm.org/t/c-20-modules-should-the-bmis-contain-paths-to-their-dependent-bmis/70422 for detail.
Simply, after the issue resolved, the last step of the following example won't compile any more:
// b.cppm
export module b;
export int b() {
return 43;
}
// a.cppm
export module a;
import b;
export int a() {
return b() + 43;
}
// user.cpp
import a;
int use() {
return a();
}
clang++ -std=c++20 b.cppm --precompile -o b.pcm
clang++ -std=c++20 a.cppm --precompile -fmodule-file=b=b.pcm -o a.pcm
clang++ -std=c++20 user.cpp -fmodule-file=a=a.pcm -c -o user.o
We need to specify all the dependency explicitly:
clang++ -std=c++20 user.cpp -fmodule-file=a=a.pcm -fmodule-file=b=b.pcm -c -o user.o
This should be a breaking change.