[Scons-users] Using Linker Plugin with Scons

Bill Deegan bill at baddogconsulting.com
Tue Oct 22 02:27:21 EDT 2013


Justin,
On Mon, Oct 21, 2013 at 3:39 PM, Justin Zane Chudgar
<justin at justinzane.com>wrote:


> > >> 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 paste the entire generated linking command ?
What happens if you put:
env.Append(LINKFLAGS = ["-Xlinker -plugin -Xlinker
\"/path/to/LLVMgold.so\""])
Also.. Try adding:

print env.Dump('LINKFLAGS')

To your SConstruct and paste the output



Is there anyway to specify this in a shell environment variable to the
clang tools?
Then you could do: env['ENV']['SOME_ENV_VARIABLE']='-Xlinker -plugin
-Xlinker "/path/to/LLVMgold.so"'

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131021/74e7dcfb/attachment.html


More information about the Scons-users mailing list