I have the code (That is split into many files). If I compile it with modulemap
file and using implicit modules, then clang fails with error. If I compile the
main file by hand (no modules options, just includes), then no error prodiced
and object file successfully creates.
As examples of this commands may be:
clang++ -x c++ -std=gnu++20 -I /usr/local/include/ -L /usr/local/lib -lpthread -
lm -lc -lexecinfo -Wno-unused-command-line-argument -pipe -I
/usr/include/c++/v1 -I . -I /usr/include -Wno-macro-redefined -Wno-pragma-
system-header-outside-header -DLCC -I /home/leonid/lcc/prebuilt/ -Ofast
/home/leonid/lcc/prebuilt/A0B39086240016481C.h -c
Not fails
And
clang++ -x c++ -std=gnu++20 -I /usr/local/include/ -L /usr/local/lib -lpthread -
lm -lc -lexecinfo -Wno-unused-command-line-argument -pipe -I
/usr/include/c++/v1 -I . -I /usr/include -Wno-macro-redefined -Wno-pragma-
system-header-outside-header -DLCC -I /home/leonid/lcc/prebuilt/ -I
/home/leonid/lcc/ -Ofast /home/leonid/lcc/prebuilt/A0B39086240016481C.h -
fmodules -fmodule-map-file=/home/leonid/lcc/prebuilt/map.modulemap -fprebuilt-
module-path=/home/leonid/lcc/prebuilt/ -c -fprebuilt-implicit-modules -
fimplicit-modules -Xclang -fdisable-module-hash -fprebuilt-module-path=prebuilt
-fprebuilt-implicit-modules -fmodules-cache-path=cache
Fails.
The report generated by clang is in attachment.
bug.7z
(434453 bytes, application/x-7z-compressed)