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

            Bug ID: 40481
           Summary: lld: cannot link library by passing absolute path
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

$ cat test.cpp
#include <QCoreApplication>
#include <QTimer>

int main(int argc, char** argv)
{
    QCoreApplication app(argc, argv);
    QTimer::singleShot(1000, [&app](){ app.quit(); });
    return app.exec();
}

$ ld --version
GNU gold (GNU Binutils 2.31.1) 1.16
...

$ g++ -g -O0 -I/usr/include/qt -I/usr/include/qt/QtCore -fPIC
-l/usr/lib/libQt5Core.so test.cpp
# this works just fine

# now I change my ld symlink and retry with ld:

$ ld --version
LLD 7.0.1 (compatible with GNU linkers)

$ g++ -g -O0 -I/usr/include/qt -I/usr/include/qt/QtCore -fPIC
-l/usr/lib/libQt5Core.so test.cpp
ld: error: unable to find library -l/usr/lib/libQt5Core.so
collect2: error: ld returned 1 exit status

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to