Skip to main content

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

Hi Mikhail & Wieant,

thank you for your responses. I've had a play around, but I'm still not getting this.

In my example toolchain (attached) I have compiler and link tools. In each there is a string option, Option1, which when I alter in one of the tools, say the compiler, I would like the same Option1 in the other tool, the linker, to reflect this value.

It seems that this would be a common thing to want to do, although the GNU toolchain doesn't seem to have any shared options.

So in the EVENT_APPLY part of my ExToolManagedOptionValueHandler() I want to read the changed option value from one tool and apply it to the twin option in the other tool. I imagine there must be a simple approach to this???

cheers john

Sennikovsky, Mikhail wrote:
Or use option.isExtensionElement()?
Absolutely. An alternative is to use something like (depending on the
particular logic/requirements)

If(option.isExtensionElement()){
	...
	//Compare id if needed
} else {
	//get the extension super-class if needed
	option = option.getSuperClass();
	//Compare id if needed
}

Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On
Behalf Of Wieant Nielander
Sent: Wednesday, November 14, 2007 1:07 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Common toolchain options


You could use the following logic in your value handler to determine
whether the given option is the one representing the
"extension.option.id" extension option:

Public boolean handleValue(IBuildObject configuration,
                    IHoldsOptions holder,
                    IOption option,
                    String extraArgument,
                    int event){
	IOption neededOption =
holder.getOptionBySuperClassId(extension.option.id");
	if(neededOption == option){
		//process the option
	}
}
Or use option.isExtensionElement()?
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: 125252, Moscow, Russian Federation, Chapayevsky Per, 14.

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

Attachment: exampleTool.zip
Description: Zip compressed data


Back to the top