libphobos: Add --enable-libphobos-checking configure option
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 22:41:14 +0000 (00:41 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 8 Apr 2020 22:46:39 +0000 (00:46 +0200)
commitc0dbfbd763ad77d6beaa345ce94afc93e193236e
treea5ddb4962be29e04a4ab27209a22c240af5114fc
parent6e286c8df452787fffe4fb4bd3dbba4d80bc6c12
libphobos: Add --enable-libphobos-checking configure option

As GDCFLAGS is overriden by the top-level make file with '-O2 -g',
libphobos ends up always being built with all contracts, invariants, and
asserts compiled in.  This adds a new configurable that defaults to omit
compiling any run-time checks into the library using '-frelease'.

Other choices either set the flags '-fno-release', enabling all run-time
checks, or '-fassert', which only compiles in asserts.

The omission of compiling in contracts results in a smaller library
size, with faster build times.

libphobos/ChangeLog:

PR d/94305
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add --enable-libphobos-checking and substitute
CHECKING_DFLAGS.  Remove -frelease from GDCFLAGS.
* libdruntime/Makefile.am: Add CHECKING_DFLAGS to AM_DFLAGS.
* libdruntime/Makefile.in: Regenerate.
* src/Makefile.am: Add CHECKING_DFLAGS to AM_DFLAGS.
* src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* testsuite/testsuite_flags.in: Add -fno-release -funittest to
--gdcflags.
libphobos/ChangeLog
libphobos/Makefile.in
libphobos/configure
libphobos/configure.ac
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libphobos/testsuite/Makefile.in
libphobos/testsuite/testsuite_flags.in