www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - druntime homebrew: setup and compile a single project with its own

reply Dmitry Ponyatov <dponyatov gmail.com> writes:
I want to play with reimplementing some tiny set of standard D 
library, mostly for language learning, and need some advice
- is it possible to use `dub` both for building custom druntime 
and test app?
- or I must write some batch or Makefile and call `dmd` compiler 
directly onto every file?
- what `dmd`/`dub` command line options forces it to drop 
system-wide druntime/phobos and use custom local .so / .a library 
in place of it?
Oct 28 2023
parent reply Hipreme <msnmancini hotmail.com> writes:
On Saturday, 28 October 2023 at 18:37:37 UTC, Dmitry Ponyatov 
wrote:
 I want to play with reimplementing some tiny set of standard D 
 library, mostly for language learning, and need some advice
 - is it possible to use `dub` both for building custom druntime 
 and test app?
 - or I must write some batch or Makefile and call `dmd` 
 compiler directly onto every file?
 - what `dmd`/`dub` command line options forces it to drop 
 system-wide druntime/phobos and use custom local .so / .a 
 library in place of it?
 - is it possible to use `dub` both for building custom druntime 
 and test app?
Yes, my engine does that
 what `dmd`/`dub` command line options forces it to drop  
 system-wide druntime/phobos and use custom local .so / .a 
 library in place of it?
If you have a module source file with the same name you want to replace, the build will prioritize your own version.
Oct 28 2023
parent Dmitry Ponyatov <dponyatov gmail.com> writes:
 If you have a module source file with the same name you want to 
 replace, the build will prioritize your own version.
You mean I can create `project/druntime`, and replace the core D runtime part by part by placing here my own files from druntime source? And compiler will route his internal callbacks etc into my own partial stdlib without any undocumented options or .a/.so prebuilding ?
Oct 29 2023