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
Some compilers that act as linker drivers (dmd and ldc) need to split
arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar).
As such we need to detect that the previous argument contained -soname,
and not wrap that in a --start-group/--end-group
This modifies the shared library test to demonstrate the problem, with a
test case.
Fixes#6359
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.
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.