I am beginner and Windows user. In directory MinGW\bin\ I call llvm-gcc.exe hello.c -emit-llvm -S and file hello.s is created. I want to compile this assembler code by calling llvm-gcc.exe hello.c -emit-llvm, it appear collect2: cannot find 'ld'; ld.exe is in this directory. I have problem with paths? How I can compile not directly c do bytecode but hello.s to bytecode? -- View this message in context: http://old.nabble.com/I-try-to-compile-to-LLVM-code-tp29411016p29411016.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Hello Borneq, If you want to compile bitcode into assembly, you need to invoke the llvm-as and llc commands on it to convert it from LLVM Assembly source to bitcode and then native assembly source instead of llvm-gcc. If that doesn't work, post back here, --Sam ----- Original Message ----> From: Borneq <borneq at wp.pl> > To: llvmdev at cs.uiuc.edu > Sent: Wed, August 11, 2010 1:01:09 PM > Subject: [LLVMdev] I try to compile to LLVM code > > > I am beginner and Windows user. > In directory MinGW\bin\ I call llvm-gcc.exe hello.c -emit-llvm -S > and file hello.s is created. > I want to compile this assembler code by calling llvm-gcc.exe hello.c > -emit-llvm, it appear collect2: cannot find 'ld'; ld.exe is in this > directory. I have problem with paths? > How I can compile not directly c do bytecode but hello.s to bytecode? > -- > View this message in context: >http://old.nabble.com/I-try-to-compile-to-LLVM-code-tp29411016p29411016.html > Sent from the LLVM - Dev mailing list archive at Nabble.com. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Samuel Crow wrote:> > If you want to compile bitcode into assembly, you need to invoke the > llvm-as and > llc commands on it to convert it from LLVM Assembly source to bitcode and > then > native assembly source instead of llvm-gcc. >llvm-as compiled hello.s to hello.s.bc. How link it with stdio - I use printf llc is virtual machine? If I call llc with hello.s.bc it do nothing (because printf not linked) LLVM serve garbage collection? How use it? If I write "p=malloc(100)" it probably not free with GC. How write finalizer method called before free? -- View this message in context: http://old.nabble.com/I-try-to-compile-to-LLVM-code-tp29411016p29426020.html Sent from the LLVM - Dev mailing list archive at Nabble.com.