DIP 11: trial partial implementation

Jacob Carlborg doob at me.com
Mon Jun 20 14:32:29 PDT 2011


On 2011-06-20 21:32, Nick Sabalausky wrote:
> "Jacob Carlborg"<doob at me.com>  wrote in message
> news:itljh6$d4l$1 at digitalmars.com...
>> On 2011-06-19 20:31, Nick Sabalausky wrote:
>>> "Jacob Carlborg"<doob at me.com>   wrote in message
>>> news:itkp2l$1ru0$1 at digitalmars.com...
>>>> On 2011-06-19 02:10, Adam D. Ruppe wrote:
>>>>> http://arsdnet.net/dcode/build2.d
>>>>>
>>>>> * Be fast. It loops dmd like my old build.d. (I can't find a better
>>>>>      way to do it. Even rdmd always runs dmd at least twice - check
>>>>>      its source!)
>>>>
>>>> That shouldn't be necessary.
>>>>
>>>> First run:
>>>>
>>>> * Run the compiler once with the -deps flag to collect the dependencies
>>>> * Run the compiler again to compile everything
>>>> * Cache dependencies
>>>>
>>>> Later runs:
>>>>
>>>> * Run the compiler once with the -deps flag and compile everything
>>>
>>> Using the -deps flag to *just* get the deps is very fast. Much faster
>>> than a
>>> full compile.
>>
>> I understand that that would be faster when the dependencies have changed
>> but if they haven't then you just have to run the compiler once. Don't
>> know what would be best to do though.
>>
>> BTW, to just get the dependencies, would that be with the -deps and -c
>> flags? Is the a better way? I mean if you just specify the -deps flag it
>> will do a full compilation. Seems to me that skipping linking (-c flag) is
>> a little too much as well for what's actually necessary. Would be good to
>> have a flag that does only what's absolutely necessary for tracking
>> dependencies.
>>
>
> What I meant was that doing a deps-only run is fast enough that doing it
> every time shouldn't be a problem.
>
> However, I am starting to wonder if RDMD's functionality should built into
> DMD (ideally in a way that LDC/GDC wouldn't have to re-implement it
> themselves). DDMD does take about a minute or so to compile, and while the
> deps-only run is the faster part, it's not insignificant. But then, maybe
> that's just due to some fixable inefficiency in DMD? There's very little
> templates/ctfe involved.

I guess one could add the "-o-" (do not write object file) flag as well. 
Don't know how much that would help though. I guess DMD does need to do 
most of the process it normally does on the files due to static if, 
mixins and other meta programming features.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list