[llvm-bugs] [Bug 42133] New: clang driver wrongly passes -plugin-opt=Oz instead of -plugin-opt=O3 for "-Oz -flto"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 4 23:35:24 PDT 2019


            Bug ID: 42133
           Summary: clang driver wrongly passes -plugin-opt=Oz instead of
                    -plugin-opt=O3 for "-Oz -flto"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: balarishi.bhogadi at amd.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

$ clang -v -Oz -flto foo.c
 "/home/LLVM/bin/ld.lld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out
-L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../lib64 -L/lib/x86_64-linux-gnu
-L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/home/LLVM/bin/../lib -L/lib
-L/usr/lib -plugin /home/LLVM/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64
-plugin-opt=Oz -plugin-opt=-disable-itodcalls=false
-plugin-opt=-disable-itodcallsbyclone=false /tmp/foo-b672c1.o -lgcc --as-needed
-lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
ld.lld: error: -plugin-opt=Oz: number expected, but got 'z'
clang-9: error: linker command failed with exit code 1 (use -v to see

The above error is due to passing "-plugin-opt=Oz" to lld by clang driver.

But for "-Ofast -flto", "-plugin-opt=O3" was passed to lld by clang driver.

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/20190605/b01257e5/attachment.html>

More information about the llvm-bugs mailing list