D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
This is needed when mixing D and C code, as it's possible to end up
witha combination of linkers and compilres such that C produces pdb
files but D does not.
Static libraries don't have PDB files. A PDB that would previously end
up installed alongside a static library belonged in fact to the dynamic
version of the same library built at the same time.
This was because the former minstall.Installer implementation, when
installing a file target, also blindly copied any *.pdb file it found
whose filename was matching the target. So, for example installing
foo.dll and foo.a would also install two copies of foo.pdb into both
bin/ and lib/, which doesn't seem like the right thing to do - foo.pdb
should only get installed with foo.dll.
This allows us to disable the shared library test if the GNU D compiler
is detected.
This is useful, because gdc can not yet build proper shared libraries.
We also add a new test here which tests versioning of D shared
libraries.