bearophile wrote:
Bill Baxter:
That's a good point. I never think of stuff like that because I use
dsss most of the time.
You want per-file flags? Ha! Dsss laughs at you. Unfortunately. :-(
I usually compile programs with bud, that applies the same thing to all
modules. I presume as dsss.
As soon as Walter realizes that's a quite natural way to use D (that is, to let
something (possibly the compiler) find the modules it needs by itself. LDC may
eventually grow this essential feature), he may think about ways to influence
the compiler from the code itself, creating compiler directives that can be
embedded in the code (as in Pascal).
I am not sure this is the best good solution, maybe there are better solutions,
like improving those tools (or the compiler) to allow a finer specification of
the compilation flags.
Bye,
bearophile
Back when I was working, someone had put a pragma somewhere in the
source tree that turned on link-time code generation for the whole
project. Every build (i.e. a developer build on my machine) took ~26
minutes. This is especially damning when you've spent your entire
programming career being taught to recompile at every code change (or
using IDEs that compile stuff in the background). (I eventually hunted
down the flag and got the build time down to manageable levels)