Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] General toolchain options

> >>> Yes there is, each tool can define its own commandLineGenerator, this
> >>> tool specific generator can query the required global toolchain
> >>> option and add the appropriate option.
> >> If I implement my own commandLineGenerator, do I need to implement the
> >> entire IManagedCommandLineInfo interface, or can I return null values
> >> for any part I don't want to modify?
> > 
> > Our implementation ends with:
> >         return new ManagedCommandLineInfo( resolvedCmd, "", "",	cmdflags, "", "", "", "" );
> > 
> > In which 'resolvedCmd' is the full command line including the tool
> > (compiler, linker) to be called, and 'cmdflags' is just the option
> > part. The first is used by the builders, and the 'cmdflags' string is
> > shown in the 'All options:' box when you select the tool in the 'Tool
> > settings' property tab.
> 
> But how do I obtain the "resolvedCmd" string? I'm guessing that I don't
> need to implement things like variable resolvement myself.
> 
> I don't want to replace the entire command-line, I just want to add some
> flags (from the toolchain).

We use a special 'macro' layer on top of the build definitions to
handle enablement etc. that required our own DIY implementation, but
there are more ways to Rome. E.g. you might try to extend the core
ManagedCommandLineGenerator, use that to build the base command line
info, then add the global flags to it.

Regards,
  Wieant


Back to the top