Errors compiling DSSS

Jacob Carlborg doob at me.com
Sat Dec 1 05:13:46 PST 2012


On 2012-11-30 18:12, Rob T wrote:

> Personally, I don't see how that would work using the current form of
> the output. I tried it with Make to figure out dependencies and the
> problem I immediately ran into was that the output did not contain full
> path information for the projects modules, and without that information,
> there was no way to combine builds from related project under a separate
> folder. What I find, is that with D, people seem to be building in
> simple ways, everything under one folder. This works perhaps for many
> people, but not for everyone. Currently I want send all build output to
> a separate folder outside my project folder onto a separate drive, but I
> can't do something even that simple. Sure I can hack it with perhaps a
> symbolic, but that's a hack which sucks.

That command will output the full path to the source files. Am I missing 
something?

Example of output: http://pastebin.com/mCWGHyn7

When you say "build output" are you referring to the object files? In 
that cases these flags are available:

   -odobjdir      write object & library files to directory objdir
   -offilename    name output file to filename


> No doubt the compiler should be a library. Why isn't it?

I don't know. The compiler is fairly old, especially the backend.

> If it was a
> library, then perhaps it could use itself in some very interesting ways.

Yes, perhaps for CTFE, instead of embedding an interpreter.

> The compiler should also accept plugins for extensibility.

Absolutely, that would be nice.

> I have not
> looked at the code yet, but I suspect what we have under the hood will
> make me want to cry.

Don't look, personally I think the code look horrible.

> If there's information inside the source, then the compiler could use
> that information during a build. A very simple example of this, would be
> the imports. So instead of manually dumping a deps file, and working
> some build script magic, the compiler could have that information
> available internally, thereby saving the programmer from hacking away at
> an external build script to get it. My guess that's the least of the
> advantages, there's probably a lot more that could be done.

The compiler do have all the knowledge about which source files a build 
depends on, that's why we can get the output using the -deps flag. It 
just don't compile the source files unless you explicitly tell it to.


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list