Build Script in D
David
d at dav1d.de
Fri Jan 11 06:01:47 PST 2013
> also something like this for custom target:
> auto builder = Builder( homepath!"./", arch!"x86", mode!"debug" )
Doesn't work, these are compiler flags, which differ from compiler to
compiler. You could make the builder call the compiler to set the flag,
but I would move that directly to the compiler.
> // assuming all methods returns ref to self so it could be just simple
> calls
> builder.addSrcPath("path_to_src_folder_1");
> // or can be chained
> builder.addSrcPath("path_to_src_folder_2").
> addSrcPath("path_to_src_folder3");
And how does chaining help? That makes everything just uglier.
> builder.addImportPath("path_to_imports");
> builder.addLinkLib("somelib.a");
Need to be set for the compiler, A C compiler doesn't need the flags of
a D compiler
> // compiler log
> string log = builder.build();
The log should be in realtime to see where compilation takes longest etc.
> also to all above it would be good if there be some concept of multiple
> targets or jobs and ordering, to allow build stuff dependent on other
> stuff in one run
Everything is compiled without beeing linked, order doesn't mean
anything, because everything will be linked together.
More information about the Digitalmars-d-announce
mailing list