[llvm-bugs] [Bug 46875] New: -B options are not translated into -L options for the linker

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 28 11:07:53 PDT 2020


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

            Bug ID: 46875
           Summary: -B options are not translated into -L options for the
                    linker
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rixript at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Steps to reproduce:

* Create a dummy file, which can be linked, e.g.

    int main() { return 0; }

* Execute:

> $ mkdir ADD_ME_AS-L
> $ clang++ main.cpp -B ADD_ME_AS-L --verbose 2>&1 | grep ADD_ME_AS-L --color=auto
> <no output>
> $ g++ main.cpp -B ADD_ME_AS-L --verbose 2>&1 | grep ADD_ME_AS-L --color=auto
> <outputs line where LD is executed with -LADD_ME_AS-L option>

According to the docs:
-B prefixes that effectively specify directory names also apply to libraries in
the linker, because the compiler translates these options into -L options for
the linker.

But clang does not do that.

For more details, see:
https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

-- 
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/20200728/5b927790/attachment.html>


More information about the llvm-bugs mailing list