[Scons-users] Using Linker Plugin with Scons

Justin Zane Chudgar justin at justinzane.com
Mon Oct 21 18:39:42 EDT 2013



> >> Justin,

> >>

> >> Please take a look at the manpage.

> >> You're looking for *LINKFLAGS

> >>

> >> Depending on what you are linking, you'll need to add it to the

> >> appropriate

> >> version of this flag(s).

> >

> > Bill: I have "rtfm" and tried various incantations to add the `-Xlinker

> > -

> > plugin -Xlinker "/path/to/LLVMgold.so"` options to LINKFLAGS. It seems

> > that no> >

> > matter how I try this:

> > `env.Append(LINKFLAGS = Split("-Xlinker -plugin -Xlinker

> >

> > \"/path/to/LLVMgold.so\""))`

> > or

> >

> > `env.Append(LINKFLAGS = Split("-Xlinker \"-plugin\" -Xlinker

> >

> > \"/path/to/LLVMgold.so\"")`

> > etc... I end up with an output commandline that only includes "-plugin -

> > Xlinker"

>

> can you show us the complete SConstruct/SConscript?

>

> Regards,

>

> Dirk


I'm working on a personal fork of Wesnoth here:
https://github.com/justinzane/wesnoth-old/tree/jz_clang

The file in question is "SConstruct.py" which is symlinked to SConstruct in my
working directory. Git, as I have learned :), does not handle that well. The
only reason for the weird symlink is so that Eclipse CDT will open it in an
external editor.

The section in question is at ~line 307. Note that I have tried numerous
variations on the string to append to LINKFLAGS, just the last failure is
there.

*Additionally*, I'm going to give Google's gperftools a try since clang++ does
not do '-pg' yet. That will require '-l<iforgetthename>' being linked in as
well.

Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20131021/b023a8bc/attachment.pgp


More information about the Scons-users mailing list