Mark A Russell wrote: > Yannick Menager (posted after your comments) had an interesting idea. Maybe > we do > both. We could have our main compile task that can both compile and link > but > also maybe add a seperate link task. This would add some flexability for > those who wanted/needed to do these tasks seperatly.
I'd support this choice - have the link task execute the linking part of your omnibus compiler task. > >>The name of the task is another issue. I think the names I chose are > pretty > >>crap - I'd like something more descriptive, <cppcomp> is fine. Maybe > >><cppcompile> or <compilecpp> is better? > > compilecpp is fine by me, but one question that goes along with this. Is it > just > a C++ task or is it also a C task? If its both (really should be) then > maybe C_CPPCompile? Actually, I prefer Adam's initial <cc>. Maybe <cclink> for the link task. Everyone who needs to do C/C++ compilation knows what cc is, or they know what gcc is and making the leap isn't hard. Having a name like <c_cpp_compile> is a little verbose, IMHO. > The only reason I didn't define an optimize attribute originally is because > I couldn't decide what level of optimization it should do. Should it be a > lvl > thing like 1-5 and then each compiler adapter determines what flags that > corresponds > to? or just true/false where true means just the basic default optimization? <cc optimize="yes" optimization_level="adapter_specific_string" ... /> The adapter has the choice of paying attention to the level or not; a documentation issue. > Agreed. Maybe we make GCC the default since a port of it exists on nearly > every > platform? Would like comments from the group on this one. I'd agree with gcc being the default. You may want a magic property like the java compiler does for specifying which compiler to use if its not defined with the task. > The only further questions I have are about our handling of libraries. > How will we handle libraries when the object file(s) are newer then those > contained within the library we built? Do we just update the library, or > completely rebuild the library? I don't know enough about library linking to say this with any authority, but if you can do an incremental update, that would probably be preferred. > We will also need to do some checks when we link executables. I am thinking > mostly in the case where the libraries we previously linked against are now > newer > then the executable. Shouldn't be much of an issue, but something to keep > in mind. I'd relink the executable by default - there's no point in having an output executable that is out of date with the library. > Again comments would be most welcome from the group Hope the comments from the guy who hasn't done C/C++ in a couple of years (but really wants to see this task work so I can sway the last of the make adherents in his workplace to the light) were useful. :-) Glenn McAllister SOMA Networks, Inc.
