[Dlang-internal] druntime: proposed changes in code organization

Denis Feklushkin feklushkin.denis at gmail.com
Sat Dec 16 13:04:27 UTC 2023


On Wednesday, 13 December 2023 at 17:43:06 UTC, Johan wrote:
> On Saturday, 2 December 2023 at 08:10:57 UTC, Denis Feklushkin 
> wrote:
>> On Friday, 1 December 2023 at 12:53:55 UTC, IGotD- wrote:
>>
>>> Thank you, now I have a better understanding what a tag is. 
>>> Correct me if I'm wrong so these tags are like "feature 
>>> defines" similarly to a boatload of C defines that you must 
>>> define for certain C-libraries.
>>
>> No, if I correctly understand this "C features defines" concept
>>
>>> Will these tags eventually become version identifiers inside 
>>> the code?
>>
>> No
>>
>>> Also one question if the tags are visible inside the D code 
>>> or just outside the code in the build system?
>>
>> Tags are visible only for druntime build system
>
> How is this going to work for cross-compilation with _one_ 
> compiler druntime? LDC is a cross-compiler and uses the same 
> source files for any target.

With ldc2 we can switch druntime by using custom .conf file 
("--conf=" option).
I successfully use this for my custom druntime builds

> A single LDC installation must be able to compile to any target 
> platform, i.e. with a single druntime installation. 
> (target-dependent copying of files by the compiler build system 
> does not fulfill that requirement)
> To me, it sounds like your changes make separate druntime 
> installations per target.

Yes, you are right

More precise: same as we already(?) provide separate druntime 
binaries for each target (i.e., Linux, Windows, etc) I propose to 
provide a separate include dir for each of these druntime binary

> This is not acceptable for LDC.

It seems to me, for proposed druntime switching, syntax of 
/etc/ldc2.conf already contains all necessary things?



More information about the Dlang-internal mailing list