[LLVMdev] tblgen bug in handling case , switch_on

Sanjiv Gupta sanjiv.gupta at microchip.com
Sun Sep 13 00:14:36 PDT 2009


Mikhail Glushenkov wrote:
> Hi,
>
> On Fri, Sep 11, 2009 at 11:46 AM, Sanjiv Gupta
> <sanjiv.gupta at microchip.com> wrote:
>   
>> Looks good.
>> One more quick query.
>> How to extract  libname from "-l std" from the driver and pass it as
>> "std.lib" to the linker tool?
>> I know that unpack_values will give me "std", but an (append_cmd ".lib")
>> with that will insert a space.
>>     
>
> This won't work since actions are not composable (alas).
>
>   
>> Anything like append_cmd_nospace ? or any other way?
>>     
>
> I'm afraid there is no way to do this right now. One way to support
> this is to extend the hook mechanism to work with actions:
>
> (case (not_empty "-l"), (append_cmd "$CALL(AppendLibSuffix)"))
>
>   
Thanks for thinking over it.
On second thoughts, I feel that it isn't right to ask for a feature for 
every such thing. The right way to do this is to fix one's linker itself 
so that it accepts a -l option as such forwarded by the driver.

- Sanjiv




More information about the llvm-dev mailing list