[LLVMdev] Questions about clang options
Eli Friedman
eli.friedman at gmail.com
Thu Aug 2 12:36:11 PDT 2012
On Thu, Aug 2, 2012 at 8:56 AM, Xinglin Zhang <xinglinzh at gmail.com> wrote:
> Hi,
>
> I am quite new to LLVM. I just compiled LLVM and clang on Ubuntu11.10 then
> followed the tutorial http://llvm.org/docs/DebuggingJITedCode.html
>
> clang -cc1 -O0 -g -emit-llvm showdebug.c
>
>
> where showdebug.c contains:
>
> #include<stdio.h>
> int main()
> {
> printf("hello\n");
> return 0;
> }
>
> But I got
> Fatal error: 'stdio.h' file not found.
>
>
> However,
>
> clang showdebug.c
>
>
> has no problem. I know -g means to generate debug information, -emit-llvm
> means use the llvm representation for assembler and object files.
>
> Then what do -cc1 and -O0 mean?
-O0 means "turn off optimization". -cc1 means "please screw up my
compilation in mysterious ways".
-Eli
More information about the llvm-dev
mailing list