Best way to force rebuild of LLVM after changing it?

235 views
Skip to first unread message

Arch Robison

unread,
Dec 6, 2013, 11:18:32 AM12/6/13
to juli...@googlegroups.com
If I'm experimenting with modifications to LLVM and want to force a rebuild of Julia that uses those changes.  What's the best way to force a (preferably minimal) rebuild?  I tried running "make julia-debug" and it seemed to do nothing after I modified deps/llvm-3.3/lib/Transforms/Vectorize/LoopVectorize.cpp .

Krzysztof Kamieniecki

unread,
Dec 6, 2013, 11:30:35 AM12/6/13
to juli...@googlegroups.com
From what I remember, I rebuilt LLVM. then ran the top level make.

Matt Bauman

unread,
Dec 6, 2013, 1:18:51 PM12/6/13
to juli...@googlegroups.com
On Friday, December 6, 2013 11:30:35 AM UTC-5, Krzysztof Kamieniecki wrote:
From what I remember, I rebuilt LLVM. then ran the top level make.

Yes, that should work.  The top level script (make -C deps compile-llvm) simply checks for the existence of the libLLVMJIT library within the build folder.  You could remove that to force it to execute LLVM makefile (which should do a minimal rebuild).  But just running make within the LLVM directory should work, too.  Note, though, that depending upon your system the top level script will run LLVM's Makefile with some additional flags.

Arch Robison

unread,
Dec 6, 2013, 3:47:54 PM12/6/13
to juli...@googlegroups.com
Thanks for suggestions.  I played around with them and the following seems to work:
rm usr/lib/libjulia-debug.so
rm deps/llvm-3.3/build_Debug+Asserts/Debug+Asserts/lib/libLLVMJIT.a
make debug
Skipping the first step seemed to cause LLVM to be rebuilt, but not reintegrating it into Julia.

Viral Shah

unread,
Dec 7, 2013, 2:58:34 AM12/7/13
to juli...@googlegroups.com
You could also try using LLVM as a shared library by building julia with USE_LLVM_SHLIB=1. Then you just keep rebuilding LLVM, and make sure it gets copied into the julia/usr/lib. 

As an aside, for our next release, I want to see if we can build LLVM as a shared library by default. This is already being done for the debian package, and it would help packaging on other distros too.

-viral

Arch Robison

unread,
Dec 9, 2013, 3:46:21 PM12/9/13
to juli...@googlegroups.com
The shared-library solution is just what I wanted.  Thanks! 
Reply all
Reply to author
Forward
0 new messages