Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Language Settings Providers and toolchain prefixes

Hi Matt,

On Thu, Oct 18, 2012 at 2:46 AM, Matt Jervis <matt.jervis@xxxxxxxxxxxxx> wrote:
 * Should ${COMMAND} include the prefix? if not, is there a variable I can use to get the prefix (e.g., ${PREFIX}${COMMAND})?
The intention was to use/reuse variables from managedbuilder plugin. For some reason, it does not define ${PREFIX} variable. I think we should be consistent here. I did not work much with cross compilers but perhaps ${PREFIX} should be added to both places?
Yes, I think that it would make sense for there to be a ${PREFIX} variable to get the prefix from the toolchain, and it would also make sense for the default command to get compiler specs parameter to use ${PREFIX}${COMMAND} rather than just ${COMMAND} since ${PREFIX} would simply be empty if there was no prefix defined.
I would suggest to create a bugzilla with an enhancement request to keep track of this idea.
 * If I do need to change the 'Command to get compiler specs' is it possible to do this programmatically?
Yes, it should be possible. Take a look at JavaDoc for ILanguageSettingsProvider, AbstractBuiltinSpecsDetector and ToolchainBuiltinSpecsDetector. Let me know if you have difficulties with that.
I have achieved what I wanted by declaring a new language settings provider in my plugin.xml; this provider uses the GCCBuiltinSpecsDetector class and has a customised parameter attribute (just the default value with the toolchain prefix prepended).  I then have a custom project type in which I define configurations that have this provider and the User Settings Provider as their language settings providers.  The only issue I have is that the check boxes next to the language settings providers in the Providers tab of project properties stay unticked until I close and reopen the project; this is not really a problem for me since I just have the project generation code close and reopen the project before it finishes.
As far as checkboxes, it sounds that there is something wrong, do you use a custom New Project Wizard by any chance?
Based on what I have done so far, it appears that the language settings providers only provide include paths, marcos, etc. for the indexer, and don't contribute to the actual build.  I.e., if I create a language settings provider that defines some macros, these macros don't appear on the commandline when a build is invoked.  Is my understanding correct, or am I doing something wrong?  If this is correct, then what is the proper way of passing such information to the actual build system? Should I be using the 'Paths and Symbols' page of project properties?  The reason that I am not at present is that I have the 'CDT Managed Build Settings Entries' provider disabled in order to disable the legacy discovery support, and that means that the information entered on the Paths and Symbols page is not used by the indexer.
You should use MBS provider but disable legacy scanner discovery. Not sure why you are picking it. As far as I remember it should be disabled by default unless you define scannerConfigDiscoveryProfileId explicitly for toolchain or input type via buildDefinitions extension point. Maybe you are using existing CDT input type where they are defined or added programmatically for legacy support.


Thanks again for your help.


cdt-dev mailing list

Back to the top