Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Suggested change to String option command generation.

We at TI would like to see this too.  Our code generation tools have a
lot of similar options that would benefit from this as well.

The current String option method really is only of any use for the
catch-all box where the user can type anything they want that we have
not already exposed via some other option in the GUI.

As a related topic, something we at TI were thinking of doing sometime
down the road was extending the "catch all" box so that it would show
the full command line string that would be passed to the tool (i.e. it
would pick up the output of all the other options based on their states)
so that the user a) could actually see everything that would be passed
to the tool and in what order, and b) so in theory the user could edit
whatever they wanted in that box and theoretically have it parsed back
and reflected in the other options in the GUI (e.g. if you turned on the
symbolic debug checkbox, and then in the "full command to tool" box you
removed the -g flag, then the symbolic debug checkbox would get
unchecked).


Regards,


Chris


___________________________________________
 
Chris Recoskie
Software Designer
IDE Frameworks Group
Texas Instruments, Toronto
 
 

> -----Original Message-----
> From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On
> Behalf Of Treggiari, Leo
> Sent: Wednesday, March 03, 2004 11:33 AM
> To: cdt-dev@xxxxxxxxxxx
> Cc: Treggiari, Leo
> Subject: [cdt-dev] Suggested change to String option command
generation.
> 
> I'd like to suggest a change to how String options generate their tool
> command line contribution. Currently, the build model ignores what it
> finds in the command attribute.  This is fine for the current use of
> String options - that is, to collect "additional options" where the
user
> enters a full command or commands.  See the Cygwin Executable "Other
> optimization flags" and "Other debugging flags" as examples.
> 
> I also want to use String options for other individual "options that
> cannot be easily specified using lists or enumerations", as the
managed
> build design spec says.  For example, Intel C++ has a "Loop Unroll
Count"
> optimization.  The command line syntax is -unrolln.  I want to be able
to
> define a "Loop Unroll Count" property and have the user enter the
value of
> n.  To do that, I would like to define a String option where the
command
> is "-unroll", and the value is whatever is entered by the user into
the
> text field.
> 
> The proposal is that the build model does NOT ignore what it finds in
the
> command attribute.  Instead, if the defaultValue attribute is present,
and
> contains a string of length > 0, then the command string (if any) is
> prepended to the defaultValue string to form the command line string.
> 
> The change is mostly upward compatible as the current uses of String
> options in the CDT "reference" tool chains do not need to be changed
> because the command attribute is not specified.  Therefore whether the
> command is ignored, or not, makes no difference.
> 
> The change to the code is small and I have included proposed patches
> below.
> 
> Regards,
> Leo Treggiari
> Intel Corp.
> 
> 
> Index: Tool.java
> ===================================================================
> retrieving revision 1.7
> diff -u -r1.7 Tool.java
> --- Tool.java	2 Mar 2004 16:35:03 -0000	1.7
> +++ Tool.java	3 Mar 2004 16:00:52 -0000
> @@ -216,8 +216,11 @@
>  					break;
> 
>  				case IOption.STRING :
> +					String strCmd =
option.getCommand();
>  					String val =
option.getStringValue();
>  					if (val.length() > 0) {
> +						if (strCmd != null)
> +
buf.append(strCmd);
>  						buf.append(val +
WHITE_SPACE);
>  					}
>  					break;
> 
> 
> Index: ToolReference.java
> ===================================================================
> retrieving revision 1.6
> diff -u -r1.6 ToolReference.java
> --- ToolReference.java	2 Mar 2004 15:26:50 -0000	1.6
> +++ ToolReference.java	3 Mar 2004 16:01:24 -0000
> @@ -182,8 +182,11 @@
>  					break;
> 
>  				case IOption.STRING :
> +					String strCmd =
option.getCommand();
>  					String val =
option.getStringValue();
>  					if (val.length() > 0) {
> +						if (strCmd != null)
> +
buf.append(strCmd);
>  						buf.append(val +
WHITE_SPACE);
>  					}
>  					break;
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top