First module

Cecil Ward cecil at cecilward.com
Fri Jul 7 14:13:46 UTC 2023


On Thursday, 6 July 2023 at 21:10:39 UTC, Cecil Ward wrote:
> I’ve written my first non-trivial module in D. See other 
> thread. 
> https://forum.dlang.org/thread/pfjpqcywxrmxwsncyxeq@forum.dlang.org
>
> I’d like to set up something to call it from other modules, and 
> specifically I’d like to see if inlining works across module 
> boundaries - I have no idea whether it does or not as I don’t 
> understand fully in detail how module imports work.
>
> How do I go about setting up such a test harness with LDC (or 
> GDC) on either OSX/ARM or Linux Debian x86-64? I’m not sure 
> what tools I need.
>
> Note that I cannot use DMD, this code is LDC/GDC-specific. LDC 
> would be my preference as that is what it is ultimately aimed 
> at.

Do I just provide two filenames as inputs to the compiler ? I’m 
wondering if the compiler resolves the import statements rather 
than the linker - is that right? I only have a vague 
understanding of how the import statement works - pulling in 
digested intermediate-code or something?

Will in-line functions be inlined even if the called routine is 
across a module boundary?


More information about the Digitalmars-d-learn mailing list