[llvm-commits] [PATCH] Shared library for LLVM (issue198059)

nlewycky at google.com nlewycky at google.com
Thu Feb 18 13:52:02 PST 2010


http://codereview.appspot.com/198059/diff/9002/10008
File Makefile.rules (right):

http://codereview.appspot.com/198059/diff/9002/10008#newcode616
Makefile.rules:616: LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
We should give packagers a flag to tune the rpath path to work around
any problems -- or more importantly, turn it off entirely. The libraries
should be findable through normal ldconfig lookup once installed.

http://codereview.appspot.com/198059/diff/9002/10008#newcode962
Makefile.rules:962: LLVMLibsPaths +=
$(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT)
I don't follow; examples are linked shared even when shared library is
off? Or is SHLIBEXT the static extension when shared libraries are
disabled?

http://codereview.appspot.com/198059/diff/9002/10004
File configure (right):

http://codereview.appspot.com/198059/diff/9002/10004#newcode1406
configure:1406: --enable-shared         Link LLVM tools shared (default
is NO)
This sounds independent of whether it builds shared at all. If so, is
there a control for that?

http://codereview.appspot.com/198059/diff/9002/10006
File tools/llvm-shlib/Makefile (right):

http://codereview.appspot.com/198059/diff/9002/10006#newcode64
tools/llvm-shlib/Makefile:64: # at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133.
FYI, gcc prefers 'http://gcc.gnu.org/PR40133' style links. They have
switched bug database software once before.

http://codereview.appspot.com/198059/diff/9002/10007
File unittests/Makefile.unittest (right):

http://codereview.appspot.com/198059/diff/9002/10007#newcode32
unittests/Makefile.unittest:32: Run.Shared :=
$(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"
Oh, it's either this or try modifying the rpath, huh? And if you make
the rpath configurable you're stuck not knowing whether it's relative or
absolute. Well, please add a comment here explaining why you don't just
fix up the rpath.

http://codereview.appspot.com/198059/diff/9002/10007#newcode45
unittests/Makefile.unittest:45: $(Run.Shared) $(LLVMUnitTestExe)
The nasty part is that this makes it harder for me to run the unit
tests, or to just run the binary under gdb, etc. Without fixing up
rpath, there's nothing you can do about that.

Then again, you don't really want to install unit tests, and you are
very unlikely to want to run them against the installed libraries...
maybe we could clobber the rpath instead?

http://codereview.appspot.com/198059/show



More information about the llvm-commits mailing list