correct way to set profile for executable [message #1272] |
Fri, 20 February 2009 20:58 |
Katie Roberts-Hoffman Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hello,
What is the correct way to set the profile for an executable? I have seen
two different ways, one using cfgArgs (see 1 below) and the other using
profile (see 2 below). I do not see option 1 clearly explained in
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/bld/Library. html#.Attrs
but it occurs in examples.
Pkg.addExecutable( serverName, targ, targ.platform,
{
tcopts: "-Dxdc.cfg.check.fatal=false",
cfgScript: "server.tcf",
---> (1) cfgArgs: '{profile: "' + arguments[0] + '"}',
---> (2) profile: arguments[0],
lopts: "-l link.cmd",
}).
addObjects( [
"main.c",
] );
Thanks,
Katie
|
|
|
Re: correct way to set profile for executable [message #1494 is a reply to message #1272] |
Mon, 23 February 2009 15:36 |
Dave Russo Messages: 172 Registered: July 2009 |
Senior Member |
|
|
Katie Roberts-Hoffman wrote:
> Hello,
>
> What is the correct way to set the profile for an executable? I have
> seen two different ways, one using cfgArgs (see 1 below) and the other
> using profile (see 2 below). I do not see option 1 clearly explained in
> http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/bld/Library. html#.Attrs
> but it occurs in examples.
>
>
> Pkg.addExecutable( serverName, targ, targ.platform,
> {
> tcopts: "-Dxdc.cfg.check.fatal=false",
> cfgScript: "server.tcf",
> ---> (1) cfgArgs: '{profile: "' + arguments[0] + '"}',
> ---> (2) profile: arguments[0],
> lopts: "-l link.cmd",
> }).
> addObjects( [
> "main.c",
> ] );
>
> Thanks,
>
> Katie
>
cfgArgs is unrelated to profiles; it is only used to pass arguments
specified in your build script to a program's configuration script. If
a configuration script does not look at these arguments, they have no
affect. Moreover, _anything_ can be passed in cfgArgs.
Setting profile, on the other hand, affects the compiler options used to
build any sources associated with the profile. In the example above
main.c will be compiled with options defined by the profile named by
arguments[0].
|
|
|
Powered by
FUDForum. Page generated in 0.03880 seconds