Boost logo

Boost-Build :

Subject: Re: [Boost-build] Filter a library from the list of libraries?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-08-21 23:28:26


AMDG

On 08/21/2018 02:49 PM, Kuhl, Brian via Boost-build wrote:
> (Many thanks to Steven on answering my last question so quickly)
> ..
> My next challenge is to remove the -ldl library from the list of libraries handed to the shared library linker a.k.a the link.dll action.
> I'm trying to use MATCH for this with no success.
>
>
> local libraries = [ feature.get-values <libraries> : $(options) ] ;
> toolset.flags clang-vxworks.link LIBRARIES : $(libraries) ;
>
> # link shared libraries without libld.a
> for local e in $(libraries)
> {
> local dll_libs = [ MATCH "-l(?!dl)\w+" : $(e) ] ;
> }
> toolset.flags clang-vxworks.link.dll DLL_LIBS : $(dll_libs) ;
>
>
> Could someone identify my issue? (perhaps something in the regex needs escaping?) or perhaps suggest a better method to accomplish the same thing?
>

"(?!)" is a perlism and is not supported by MATCH.

https://boostorg.github.io/build/manual/develop/index.html#jam.language.rules.builtins.utility._match__

If you just want to remove an option, try
[ set.difference $(libraries) : -ldl ]

In Christ,
Steven Watanabe


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk