Being fully aware that llvmc2 is work-in-progress, here are some notes nethertheless: I already compiled llvm, but llvm-gcc was still compiling. Now I tried the new llvmc2: $ llvmc2 -opt -v main.c llvm-g++ -c -x c main.c -o /tmp/llvm_KeApik/main.bc -emit-llvm llvmc2: Can't find program 'llvm-g++' * after this, the directory /tmp/llvm_KeApik was not removed * why using /tmp at all? And if, why /tmp/llvm_* and not /tmp/llvmc2_* ? * why calling "llvm-g++ -x c" and not "llvm-gcc" ? * a --dry-run switch would be nice Now, llvm-gcc was was finally compiled and installed, so I retried: $ rm -rf /tmp/llvm_* $ llvmc2 -opt -v main.c llvm-g++ -c -x c main.c -o /tmp/llvm_084K2D/main.bc -emit-llvm opt /tmp/llvm_084K2D/main.bc -o /tmp/llvm_084K2D/main.bc-LXq9ea opt: error opening '/tmp/llvm_084K2D/main.bc-LXq9ea': file exists! Use -f command line argument to force output All of this is based on LLVM SVN 51761. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080530/f72cebc1/attachment.html>
Hi Holger, first of all, thanks for your feedback.> I already compiled llvm, but llvm-gcc was still compiling. Now I tried the newllvmc2:> > $ llvmc2 -opt -v main.c > llvm-g++ -c -x c main.c -o /tmp/llvm_KeApik/main.bc -emit-llvm > llvmc2: Can't find program 'llvm-g++' > > > * after this, the directory /tmp/llvm_KeApik was not removedStrange, I couldn't reproduce this. What system are you using?> * why calling "llvm-g++ -x c" and not "llvm-gcc" ? > ... > $ llvmc2 -opt -v main.c > llvm-g++ -c -x c main.c -o /tmp/llvm_084K2D/main.bc -emit-llvm > opt /tmp/llvm_084K2D/main.bc -o /tmp/llvm_084K2D/main.bc-LXq9ea > opt: error opening '/tmp/llvm_084K2D/main.bc-LXq9ea': file exists! > Use -f command line argument to force outputThanks for reporting these issues, I've fixed them in SVN.> $ rm -rf /tmp/llvm_*BTW, you didn't have to do this, llvmc always creates a unique temporary directory for each invocation.
> > I already compiled llvm, but llvm-gcc was still compiling. > > Now I tried the new > > llvmc2: > > $ llvmc2 -opt -v main.c > > llvm-g++ -c -x c main.c -o /tmp/llvm_KeApik/main.bc > > -emit-llvm llvmc2: Can't find program 'llvm-g++' > > > > > > * after this, the directory /tmp/llvm_KeApik was not removed > > Strange, I couldn't reproduce this. What system are you using?Linux in the "Debian Etch" flavour. I've now switched to SVN 51864. I tried to re-create the problem with "rm dist/bin/llvm-gcc", but now it worked as expected: the temp directory was removed.