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

            Bug ID: 39588
           Summary: invalid llvm.linker.options when using
                    module.modulemap with link specification
           Product: clang
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: f.b.brok...@rug.nl
                CC: llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Dear maintainers,

When specifying a 'link' option in module.modulemap I received:

--------------------------------------------------------------------------
clang++  -fmodules --std=c++2a -Wall -O2 -fdiagnostics-color=never  -c -o
tmp/main.o main.cc
fatal error: error in backend: invalid llvm.linker.options
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 7.0.0-6 (tags/RELEASE_700/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/main-a61967.cpp
clang: note: diagnostic msg: /tmp/main-a61967.cache
clang: note: diagnostic msg: /tmp/main-a61967.sh
clang: note: diagnostic msg: 

********************
Fatal: system - failure of system call (status 17920)
-----------------------------------------------------------------------

The requested files exceed the 1000 KB limit for attachments (it is 3.1 MB), 
but they are available in the file bugdata.tgz which can be downloaded from
https://www.icce.rug.nl/tmp/bugdata.tgz


The used module.modulemap file was:

module extra
{
    requires cplusplus

    link "bobcat"

    header "module/module.h"
    header "extra/extra.h"
}

The tree showing the involved files:
.
├── extra
│   ├── extra.h
│   └── extra.ih
├── main.cc
├── module
    └── module.ih

Compilation of the program without using the -fmodules option produces
no errors. In this case the program was compiled using:

clang++  --std=c++2a -Wall -O2 -fdiagnostics-color=never  -c -o tmp/main.o
main.cc
chdir tmp
clang++  --std=c++2a -Wall -O2 -fdiagnostics-color=never  -o bin/binary main.o
-lbobcat -s 


If there are any questions, please let me know.

Kind regards,

Frank Brokken.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to