Difference between revisions of "DRuntime development"
(Mention how to run individual targets in debug mode) |
(add common build targets) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Welcome to the D community and thanks for your interest in contributing! | Welcome to the D community and thanks for your interest in contributing! | ||
If you need help you can ask questions on <code>#d</code> IRC channel on freenode.org ([https://kiwiirc.com/client/irc.freenode.net/d web interface]) or on [http://forum.dlang.org/ our forum]. | If you need help you can ask questions on <code>#d</code> IRC channel on freenode.org ([https://kiwiirc.com/client/irc.freenode.net/d web interface]) or on [http://forum.dlang.org/ our forum]. | ||
+ | |||
+ | == Common build target === | ||
+ | |||
+ | === Build everything === | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | make -f posix.mak -j4 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Build with debug symbols === | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | make -f posix.mak -j4 BUILD=debug | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Build only as a shared library === | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | make -f posix.mak dll -j4 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Build only as a static library === | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | make -f posix.mak lib -j4 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Testing == | ||
This section explains commonly commands which are commonly used to test the low level runtime library for the D programming language. | This section explains commonly commands which are commonly used to test the low level runtime library for the D programming language. | ||
− | + | === Run all tests === | |
− | == Run all tests == | ||
The entire druntime testsuite can be run with the <tt>unittest</tt> target: | The entire druntime testsuite can be run with the <tt>unittest</tt> target: | ||
Line 13: | Line 40: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | == Run an individual test == | + | === Run an individual test === |
Sometimes it can be helpful to rerun only a single test which tests the module or feature one is working on. | Sometimes it can be helpful to rerun only a single test which tests the module or feature one is working on. | ||
Line 31: | Line 58: | ||
When you execute the <tt>unittest</tt> target, <tt>unittest-debug</tt> and <tt>unittest-release</tt> are tested. | When you execute the <tt>unittest</tt> target, <tt>unittest-debug</tt> and <tt>unittest-release</tt> are tested. | ||
− | == | + | == Benchmarking == |
If you are making a bigger change or want to improve the performance of a specific function in druntime, you should run the included benchmark script: | If you are making a bigger change or want to improve the performance of a specific function in druntime, you should run the included benchmark script: | ||
Line 38: | Line 65: | ||
rdmd benchmark/runbench.d | rdmd benchmark/runbench.d | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | [[Category:Contribution Guidelines]] |
Latest revision as of 15:35, 7 May 2018
Welcome to the D community and thanks for your interest in contributing!
If you need help you can ask questions on #d
IRC channel on freenode.org (web interface) or on our forum.
Contents
Common build target =
Build everything
make -f posix.mak -j4
Build with debug symbols
make -f posix.mak -j4 BUILD=debug
make -f posix.mak dll -j4
Build only as a static library
make -f posix.mak lib -j4
Testing
This section explains commonly commands which are commonly used to test the low level runtime library for the D programming language.
Run all tests
The entire druntime testsuite can be run with the unittest target:
make -f posix.mak unittest -j4
Run an individual test
Sometimes it can be helpful to rerun only a single test which tests the module or feature one is working on. For example:
make -f posix.mak test/coverage/.run
There are also unittest which have a different behavior when built in debug. To test this, you can set the BUILD mode:
make -f posix.mak test/exceptions/.run BUILD=debug
When you execute the unittest target, unittest-debug and unittest-release are tested.
Benchmarking
If you are making a bigger change or want to improve the performance of a specific function in druntime, you should run the included benchmark script:
rdmd benchmark/runbench.d