Tools and utilities
Throughout the book we've been using DMD to compile examples and DUB to manage the MovieMan project. Now it's time to look at some additional tools that can be part of a productive D workflow. The first tool on the list, though, is actually DMD. We're going to take a look at some of the compiler options that can be helpful during the development of D programs.
DMD
Thus far, we haven't used many options when compiling D programs, but there are quite a few of them. As demonstrated in Chapter 1, How to Get a D in Programming, the list of compiler options can be displayed by invoking DMD with no command-line options. Each option is accompanied by a brief description of what it does. Here are a few of those that you may find most useful.
Optimized and debug builds
There are a few DMD options that control optimizations and debugging. The -g
switch adds debugging information in a D-specific format. For debuggers that don't support D debug symbols, -gc
can be used to make the compiler...