Last update April 26, 2012

Hacking Phobos

Contributions to Phobos will go through a review process, read more here.

While writing source code for D, keep the D Style in mind.

Building DMD, druntime and Phobos

1. You need to download and install the following tools:

2. Create a new directory <path>.

Clone dmd, druntime and phobos to <path> from github:

  git clone <path>
  git clone <path>
  git clone <path>
Then create a branch for making your changes.
  git branch mychanges
  git checkout mychanges
This way you can edit source files to your heart's content since you can easily and switch back to the master branch whenever you mess something up.

3. Run "dvm compile <path>". This will compile dmd, druntime and phobos (in this order) and setup a correct dmd.conf file. The binary will be placed in <path>/dmd/bin<arch>.

You can create a build script, <path>/phobos/, looking something like this:

  dvm compile ..
  rdmd --compiler=../dmd/bin<arch>/dmd --build-only main.d

main.d and can be added to <path>/phobos/.git/info/exclude to be ignored.

4. After a fresh cutting edge phobos builds and runs successfully, make sure Phobos unittests all pass (make -fposix.mak unittest).

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: April 26, 2012 5:59 (diff))