1 2 3 4 5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 package xdc.bld;
20
21 /*!
22 * ======== ITarget2 ========
23 * Extension of the interface {@link xdc.bld.ITarget}.
24 *
25 * This interface contains some common structures and config parameters
26 * shared by several packages that contain targets.
27 */
28 metaonly interface ITarget2 inherits ITarget {
29
30 /*!
31 * ======== Command ========
32 * Required command and options.
33 *
34 * The compile, link, and archive functions in this interface are
35 * implemented by expanding the strings specified in this structure
36 * and inserting strings from the Options structure to form a single
37 * command. The strings in this structure can not be changed by
38 * the user (they are fixed by the target), but the string in the
39 * Options structure may be changed by the user.
40 *
41 * The final command is:
42 * Command.cmd Options.prefix Command.opts Options.suffix
43 *
44 * @field(cmd) name of a tool-chain executable without any path
45 * information. The location of this executable is
46 * specified by the binDir (or pathPrefix)
47 * configuration parameter.
48 *
49 * @field(opts) required options passed to the command; these options
50 * can not be changed or eliminated by user's
51 * configuration script.
52 */
53 struct Command {
54 string cmd; /*! the command to run */
55 string opts; /*! required options for the command */
56 }
57
58 /*!
59 * ======== Options ========
60 * User configurable command options.
61 *
62 * The option strings allow the user to pass additional parameters to the
63 * executable that is responsible for compiling, linker, or archiving.
64 * See `xdc.bld.ITarget2.Command`.
65 */
66 struct Options {
67 string prefix; /*! options that appear before Command.opts */
68 string suffix; /*! options that appear after Command.opts */
69 }
70
71 /*!
72 * ======== ar ========
73 * The command used to create an archive
74 */
75 readonly config Command ar;
76
77 /*!
78 * ======== arOpts ========
79 * User configurable archiver options.
80 */
81 config Options arOpts = {
82 prefix: "",
83 suffix: ""
84 };
85
86 /*!
87 * ======== lnk ========
88 * The command used to link executables.
89 */
90 readonly config Command lnk;
91
92 /*!
93 * ======== lnkOpts ========
94 * User configurable linker options.
95 */
96 config Options lnkOpts = {
97 prefix: "",
98 suffix: ""
99 };
100
101 /*!
102 * ======== cc ========
103 * The command used to compile C/C++ source files into object files
104 */
105 readonly config Command cc;
106
107 /*!
108 * ======== ccOpts ========
109 * User configurable compiler options.
110 */
111 config Options ccOpts = {
112 prefix: "",
113 suffix: ""
114 };
115
116 /*!
117 * ======== ccConfigOpts ========
118 * User configurable compiler options for the generated config C file.
119 *
120 * By default, this parameter inherits values specified in ccOpts, by
121 * expanding $(ccOpts.prefix) and $(ccOpts.suffix) into the values
122 * specified in ccOpts for this target.
123 */
124 config Options ccConfigOpts = {
125 prefix: "$(ccOpts.prefix)",
126 suffix: "$(ccOpts.suffix)"
127 };
128
129 /*!
130 * ======== asm ========
131 * The command used to assembles assembly source files into object files
132 */
133 readonly config Command asm;
134
135 /*!
136 * ======== asmOpts ========
137 * User configurable assembler options.
138 */
139 config Options asmOpts = {
140 prefix: "",
141 suffix: ""
142 };
143
144 /*!
145 * ======== includeOpts ========
146 * Additional user configurable target-specific include path options
147 */
148 config string includeOpts;
149 } 150 151
152