[LLVMdev] how compile subproject

Beckert Frey beckert.frey at yahoo.com
Fri May 4 19:42:59 PDT 2012


Hi, thanks for your answers.

I did:

cd workspace
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

cd llvm/

mkdir build

cd build/

../configure --enable-jit

make                                                      # OK, everything went fine.

cd ../lib/Transforms/InstCombine/            # Just to test

vim InstCombineCalls.cpp                       # added `if (0 == 1) return 0;` at getPromotedType(...)

cd ../../../build/
make ONLY_TOOLS="lli"

error:

llvm[3]: Compiling InstCombineCalls.cpp for Debug+Asserts build
/home/beckert/workspace/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp: In function ‘llvm::Type* getPromotedType(llvm::Type*)’:
/home/beckert/workspace/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:26: error: return-statement with no value, in function returning ‘llvm::Type*’
make[3]: ** [/home/beckert/workspace/llvm/build/lib/Transforms/InstCombine/Debug+Asserts/InstCombineCalls.o] Error 1
make[3]: Exiting directory `/home/beckert/workspace/llvm/build/lib/Transforms/InstCombine'

Is InstCombine required for lli?


I'm using:

Debian 6
Gnu Make 3.81
Gnu Autoconf 2.67
Gnu Automake 1.11


thanks.
Beckert.



________________________________
 From: Tim Northover <t.p.northover at gmail.com>
To: Beckert Frey <beckert.frey at yahoo.com> 
Cc: Peter Cooper <peter_cooper at apple.com>; "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu> 
Sent: Friday, May 4, 2012 4:59 PM
Subject: Re: [LLVMdev] how compile subproject
 
> Neither worked. =(

Hmm. Something seems to have gone horribly wrong then. I've just
reproduced Peter's suggestion on the autoconf build and it worked
fine. Perhaps try a clean build out of tree:

CMake:

mkdir my_special_build_dir
cd my_special_build_dir
cmake $PATH_TO_LLVM_SOURCE
make llc

Autotools:
mkdir my_special_build_dir
cd my_special_build_dir
$PATH_TO_LLVM_SOURCE/configure
make ONLY_TOOLS=llc

Both of these have just worked for me, so if they don't work for you
we may need more details: your platform and the files you see but
expect not to if only llc is built are the most obvious ones.

Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120504/ba975e58/attachment.html>


More information about the llvm-dev mailing list