[LLVMbugs] [Bug 20765] New: clang does not support the -Og optimization level in gcc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 27 01:04:12 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20765

            Bug ID: 20765
           Summary: clang does not support the -Og optimization level in
                    gcc
           Product: clang
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: softwarego at 163.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In [GCC Doc](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html), there
is an optimization level called -Og available.

>-Og
>Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. 

There are a few projects and some users (like me) which like to debug with the
`-Og` option. 

In OS X XCode Command Line tools, /usr/bin/gcc is simply a hard link or
possibly a copy of /usr/bin/clang. When I tried to use the -Og option, I got:
>error: invalid integral value 'g' in '-Og'

It appears that clang doesn't understand -Og at all.

-- 
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/20140827/25364d96/attachment.html>


More information about the llvm-bugs mailing list