Surprise using DMD as replacement C compiler
Lance Bachmeier
no at spam.net
Thu Feb 29 23:30:55 UTC 2024
On Thursday, 29 February 2024 at 21:52:50 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 01/03/2024 10:41 AM, Lance Bachmeier wrote:
>> On Thursday, 29 February 2024 at 21:34:03 UTC, Richard (Rikki)
>> Andrew Cattermole wrote:
>>
>>> There are two separate issues here, my ticket is to prevent
>>> invasive changes in a build script. What Carl's ticket is
>>> for, is to prevent an accidental infinite recursion.
>>>
>>> Both are needed :)
>>
>> What you're proposing would prevent infinite recursion,
>> wouldn't it? Maybe I'm missing something. The source of the
>> problem is grabbing the `CC` environment variable inside
>> link.d.
>
> No.
>
> DMD_CC=dmd
>
> That'll still be recursive.
You'd be telling the compiler you want an infinite recursion if
you do that, so it would be the intended behavior. Your original
proposal was
```sh
DMD_CC=$CC
CC=dmd
```
which wouldn't do that.
More information about the Digitalmars-d
mailing list