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.
This allows the harness to apply the version correctly, putting it in the right
place, dropping the right amount of numbers, etc.
pdb taking a version allows it to be more easily copied from the
shared_lib type.
Actually, GDC supports shared libraries since version 6.2, but on Debian
there are still issues with that version due to the standard library not
being compiled with PIC.
Therefore, we make a very conservative assumption here and only enable
the tests for GDC >= 7.0
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.