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

            Bug ID: 38305
           Summary: LTO doesn't allow optimization by size
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: lto
          Assignee: unassignedb...@nondot.org
          Reporter: mh+l...@glandium.org
                CC: llvm-bugs@lists.llvm.org

$ clang -fuse-ld=gold -o t main.c -Os -flto=thin
/usr/bin/ld.gold: fatal error: Optimization level must be between 0 and 3
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(Same with -Oz)

The error message is emitted by the llvm plugin, not gold (it's in
tools/lto/lto.cpp).

Interestingly, it fails at another level when using lld:

$ clang -fuse-ld=lld -o t main.c -Os -flto=thin
/usr/lib/llvm-6.0/bin/ld.lld: error: --plugin-opt: number expected, but got 's'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

-- 
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