Re: Linking the whole archive.
Scott Bailey <[email protected]> Mon, 13 Apr 2009 15:42:13 -0700
| Newsgroups | gmane.comp.sysutils.bakefile.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============7408821248011755571==
Content-Type: multipart/alternative; boundary=000e0cd14b02f511520467776c38
--000e0cd14b02f511520467776c38
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Vaclav,
Per library embedding for VC2005 is not worthwhile. It's easy to do what I
need in Linux and OSX with <ldflags>.
So, I will add something like:
if cfg._embed_libs:
tool.setAttribute("UseLibraryDependencyInputs", bool2vcstr(True))
to the "VCLinkerTool" section generated inside msvs200xprj.py's
buildLinkerToolElement().
But what should trigger setting the bool? My first impulse is to add a tag
(e.g <embedlibs/>), but maybe it is better to set a variable (e.g.
EMBED_LIBS) -- much like BUILDDIR or MSVS_PROJECT_FILE.
Which is more desireable, or is there a better way?
Thanks,
SB
On Wed, Apr 1, 2009 at 3:49 PM, Scott Bailey <[email protected]>wrote:
>
> > I'm not discussing a replacement for <library>, this is a modifier
>>> > like <lib-path>.
>>>
>>> It doesn't make sense that way -- surely you don't want to embed _all_
>>> libraries, including system ones? It sounds better to explicitly include
>>> the libraries you need included with <embed-library> instead of
>>> <library>. Or is that not possible with VC++ project files?
>>>
>>>
>> This modifier applies to <library> tag, not <sys-lib>. It should be
>> possible to do <embed-library> on a VC++ project. I would ABSOLUTELY prefer
>> this, but I'm not certain I can muster the hours necessary. Let me
>> investigate and think about it.
>>
>
> xcode2's linker flag is '-all_load'. There is a '-noall_load' flag, but it
> is obsolete and does nothing. I had hoped it would perform as the GNU
> linker's '--no-whole-archive'.
>
> While I enjoy the technical challenge of implementing a per library tag
> (i.e. <embed-library>), it is more work than I can justify.
>
> I have a perfectly acceptable method, using <ldflags> and <ldlibs>, in
> xcode2 AND gnu, but no method for msvs2005prj. Ugh.
>
> I'm done thinking about this for today. Comments?
>
--
Scott Bailey
--000e0cd14b02f511520467776c38
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Vaclav,<br><br>Per library embedding for VC2005 is not worthwhile.=A0 It=
9;s easy to do what I need in Linux and OSX with <ldflags>.<br><br>So=
, I will add something like: <br><br>=A0=A0 if cfg._embed_libs:<br>=A0=A0=
=A0=A0=A0=A0=A0 tool.setAttribute("UseLibraryDependencyInputs", b=
ool2vcstr(True))<br>
<br>to the "VCLinkerTool" section generated inside msvs200xprj.py=
's buildLinkerToolElement().<br><br>But what should trigger setting the=
bool?=A0 My first impulse is to add a tag (e.g <embedlibs/>), but ma=
ybe it is better to set a variable (e.g. EMBED_LIBS) -- much like BUILDDIR =
or MSVS_PROJECT_FILE. <br>
<br>
Which is more desireable, or is there a better way?<br><br>Thanks,<br>SB<br=
><br><br><div class=3D"gmail_quote">On Wed, Apr 1, 2009 at 3:49 PM, Scott B=
ailey <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" targ=
et=3D"_blank">[email protected]</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br><div cla=
ss=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"border-left: =
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;=
">
<div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"=
border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; paddi=
ng-left: 1ex;">
<div>> I'm not discussing a replacement for <library>, this is=
a modifier<br>
> like <lib-path>.<br>
<br>
</div>It doesn't make sense that way -- surely you don't want to em=
bed _all_<br>
libraries, including system ones? It sounds better to explicitly include<br=
>
the libraries you need included with <embed-library> instead of<br>
<library>. Or is that not possible with VC++ project files?<br>
<font color=3D"#888888"><br>
</font></blockquote></div><br></div>This modifier applies to <library>=
; tag, not <sys-lib>.=A0 It should be possible to do <embed-librar=
y> on a VC++ project.=A0 I would ABSOLUTELY prefer this, but I'm not=
certain I can muster the hours necessary.=A0 Let me investigate and think =
about it.<br>
<font color=3D"#888888">
</font></blockquote></div><br></div>xcode2's linker flag is '-all_l=
oad'.=A0 There is a '-noall_load' flag, but it is obsolete and =
does nothing.=A0 I had hoped it would perform as the GNU linker's '=
--no-whole-archive'.<br>
<br>While I enjoy the technical challenge of implementing a per library tag=
(i.e. <embed-library>), it is more work than I can justify.=A0 <br><=
br>I have a perfectly acceptable method, using <ldflags> and <ldli=
bs>, in xcode2 AND gnu, but no method for msvs2005prj.=A0 Ugh.<br>
<br>I'm done thinking about this for today.=A0 Comments?<br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Scott Bailey<br>
--000e0cd14b02f511520467776c38--
--===============7408821248011755571==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
--===============7408821248011755571==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Bakefile-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bakefile-devel
--===============7408821248011755571==--