Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3050)

Issue 198059: [PATCH] Shared library for LLVM (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by Jeffrey Yasskin
Modified:
14 years, 2 months ago
Reviewers:
xranby, nlewycky1, llvm-commits
Base URL:
https://llvm.org/svn/llvm-project/llvm/trunk/
Visibility:
Public.

Description

We've had requests from packagers in the Unladen Swallow merge PEP that we link shared against an LLVM instead of statically. This patch builds a libLLVM2.7svn.(so|dylib) and adds an --enable-shared configure flag to have the tools linked shared. (2.7svn is just $(LLVMVersion) so it'll change to "2.7" in the release.) On my mac laptop, libLLVM2.7svn.dylib is 39MB, and opt (for example) is 15M static vs 440K shared. I know of two things that are less than ideal here: 1) The library doesn't include any version information. Since we expect to break the ABI with every release, I don't expect this to be much of a problem. If we do release a compatible 2.7.1, we may be able to hack its library to work with binaries compiled against 2.7.0, or we can just ask them to recompile. I'm hoping to get a real packaging expert to look at this for the 2.8 release. 2) llvm-config doesn't yet have an option to print link options for the shared library. I'd like to add this as a subsequent patch. Fixes http://llvm.org/PR3201.

Patch Set 1 #

Total comments: 3

Patch Set 2 : check-lit passes, except unittests don't load #

Patch Set 3 : All of check-lit passes #

Patch Set 4 : Some linux fixes. Still need more rpaths. #

Patch Set 5 : Now with more rpath. check-lit passes on linux #

Patch Set 6 : Include the version in the library name. Tweak linux link opts. #

Patch Set 7 : Sync in separable changes #

Patch Set 8 : Drop shared library dependency on llvm-config #

Patch Set 9 : Fix LD_LIBRARY_PATH for linux #

Patch Set 10 : Fix breakage on darwin8 and arm #

Total comments: 14

Patch Set 11 : Try to fix build on arm and darwin8, and fix nlewycky's comments #

Total comments: 1

Patch Set 12 : Make --enable-shared control building the shared library at all #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -9 lines) Patch
M Makefile View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
M Makefile.rules View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +13 lines, -5 lines 0 comments Download
M Makefile.config.in View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M autoconf/configure.ac View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +16 lines, -0 lines 0 comments Download
M test/Makefile View 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M test/Unit/lit.cfg View 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -1 line 0 comments Download
M test/Unit/lit.site.cfg.in View 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
A tools/llvm-shlib/Makefile View 10 11 1 chunk +60 lines, -0 lines 0 comments Download
M unittests/Makefile.unittest View 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 12
nlewycky1
http://codereview.appspot.com/198059/diff/1/4 File tools/shlib/Makefile (right): http://codereview.appspot.com/198059/diff/1/4#newcode1 tools/shlib/Makefile:1: ##===- tools/lto/Makefile ----------------------------------*- Makefile -*-===## tools/shlib/Makefile http://codereview.appspot.com/198059/diff/1/4#newcode1 tools/shlib/Makefile:1: ##===- ...
14 years, 3 months ago (2010-02-02 17:43:52 UTC) #1
Jeffrey Yasskin
We've had requests from packagers in the Unladen Swallow merge PEP that we link shared ...
14 years, 2 months ago (2010-02-05 22:22:59 UTC) #2
Jeffrey Yasskin (google)
I've fixed the llvm-config problem: http://codereview.appspot.com/download/issue198059_5012.diff On Fri, Feb 5, 2010 at 2:22 PM, <jyasskin@gmail.com> ...
14 years, 2 months ago (2010-02-09 17:58:26 UTC) #3
Jeffrey Yasskin (google)
Ping? On Tue, Feb 9, 2010 at 9:58 AM, Jeffrey Yasskin <jyasskin@google.com> wrote: > I've ...
14 years, 2 months ago (2010-02-17 19:31:14 UTC) #4
echristo_apple.com
On Feb 17, 2010, at 11:31 AM, Jeffrey Yasskin wrote: > Ping? Looks reasonable to ...
14 years, 2 months ago (2010-02-17 19:33:11 UTC) #5
clattner_apple.com
On Feb 17, 2010, at 11:31 AM, Jeffrey Yasskin wrote: > Ping? This looks fine ...
14 years, 2 months ago (2010-02-17 19:38:41 UTC) #6
Jeffrey Yasskin (google)
On Wed, Feb 17, 2010 at 11:38 AM, Chris Lattner <clattner@apple.com> wrote: > > On ...
14 years, 2 months ago (2010-02-18 02:41:57 UTC) #7
Jeffrey Yasskin (google)
On Wed, Feb 17, 2010 at 11:33 AM, Eric Christopher <echristo@apple.com> wrote: > > On ...
14 years, 2 months ago (2010-02-18 02:42:11 UTC) #8
nlewycky1
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 ...
14 years, 2 months ago (2010-02-18 21:52:02 UTC) #9
xranby
http://codereview.appspot.com/198059/diff/9002/10006 File tools/llvm-shlib/Makefile (right): http://codereview.appspot.com/198059/diff/9002/10006#newcode59 tools/llvm-shlib/Makefile:59: ifneq ($(ARCH), ARM) I tested this workaround on ARM ...
14 years, 2 months ago (2010-02-18 23:23:20 UTC) #10
Jeffrey Yasskin
I think this should fix both arm and darwin8. Xerxes, could you check ARM? I ...
14 years, 2 months ago (2010-02-22 23:48:07 UTC) #11
xranby
14 years, 2 months ago (2010-02-23 09:43:59 UTC) #12
http://codereview.appspot.com/198059/diff/11001/12005
File tools/llvm-shlib/Makefile (right):

http://codereview.appspot.com/198059/diff/11001/12005#newcode61
tools/llvm-shlib/Makefile:61: ifneq ($(ARCH), ARM)
Inverted logic, change this to ifeq ($(ARCH), ARM)

Apart from this minor issue, the patch looks all ok on ARM Linux!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b