Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Different compilation of code with implicit modules replacement and without them. #50014

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR51045
Status NEW
Importance P normal
Reported by Леонид Михайлов (mathleonid@gmail.com)
Reported on 2021-07-10 07:07:12 -0700
Last modified on 2021-07-12 13:11:37 -0700
Version 12.0
Hardware PC FreeBSD
CC blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, mathleonid@gmail.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments bug.7z (434453 bytes, application/x-7z-compressed)
Blocks
Blocked by
See also
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.
Quuxplusone commented 3 years ago

Attached bug.7z (434453 bytes, application/x-7z-compressed): The report generated by clang