[llvm-bugs] [Bug 51045] New: Different compilation of code with implicit modules replacement and without them.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 10 07:07:12 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51045

            Bug ID: 51045
           Summary: Different compilation of code with implicit modules
                    replacement and without them.
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mathleonid at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210710/69ef089f/attachment.html>


More information about the llvm-bugs mailing list