diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-03-25 09:38:58 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-04-18 18:25:49 +0200 |
commit | 261bd78d57d40a03f340cfe4fc78ff9717c9602d (patch) | |
tree | 56918700689bbafd55af340a13d15c94ac5831fe /libphobos/configure.ac | |
parent | baf3b9b2e5259558ef86bd62398e2ccecd7a4a4c (diff) | |
download | gcc-261bd78d57d40a03f340cfe4fc78ff9717c9602d.tar.gz |
libphobos: Add --with-libphobos-druntime-only option.
The intended purpose of the option is both for targets that don't
support phobos yet, and for gdc itself to support bootstrapping itself
as a self-hosted D compiler.
The libphobos testsuite has been updated to only add libphobos to the
search paths if it's being built. A new D2 testsuite directive
RUNNABLE_PHOBOS_TEST has also been patched in to disable some runnable
tests that have phobos dependencies, of which is a temporary measure
until upstream DMD fixes or removes these tests entirely.
gcc/testsuite/ChangeLog:
* lib/gdc-utils.exp (gdc-convert-test): Add dg-skip-if for tests that
depending on the phobos standard library.
libphobos/ChangeLog:
* configure: Regenerate.
* configure.ac: Add --with-libphobos-druntime-only option and the
conditional ENABLE_LIBDRUNTIME_ONLY.
* configure.tgt: Define LIBDRUNTIME_ONLY.
* src/Makefile.am: Add phobos sources if not ENABLE_LIBDRUNTIME_ONLY.
* src/Makefile.in: Regenerate.
* testsuite/testsuite_flags.in: Add phobos path if compiling phobos.
Diffstat (limited to 'libphobos/configure.ac')
-rw-r--r-- | libphobos/configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libphobos/configure.ac b/libphobos/configure.ac index ffd12981d0b..8c89ebd23b0 100644 --- a/libphobos/configure.ac +++ b/libphobos/configure.ac @@ -152,8 +152,21 @@ AC_ARG_ENABLE(libphobos, [AS_HELP_STRING([--enable-libphobos], [Enable libphobos])]) AC_MSG_RESULT($enable_libphobos) +AC_MSG_CHECKING([for --with-libphobos-druntime-only]) +AC_ARG_WITH(libdruntime-only, + AS_HELP_STRING([--with-libphobos-druntime-only={yes,no,auto}], + [build only the druntime library (default: auto)]),, + [with_libdruntime_only=auto]) +AC_MSG_RESULT($with_libdruntime_only) + +case "$with_libdruntime_only" in + yes|no|auto) ;; + *) AC_MSG_ERROR([Invalid argument for --with-libphobos-druntime-only]) ;; +esac + # See if supported. unset LIBPHOBOS_SUPPORTED +unset LIBDRUNTIME_ONLY AC_MSG_CHECKING([for host support for libphobos]) . ${srcdir}/configure.tgt case ${host} in @@ -187,6 +200,15 @@ yes:*) use_libphobos=yes ;; esac AM_CONDITIONAL(ENABLE_LIBPHOBOS, test x$use_libphobos = xyes) +# Decide if only libdruntime should be built. +case $LIBDRUNTIME_ONLY:$with_libdruntime_only in +*:no) only_libdruntime=no ;; +*:yes) only_libdruntime=yes ;; +yes:*) only_libdruntime=yes ;; +*:*) only_libdruntime=no ;; +esac +AM_CONDITIONAL(ENABLE_LIBDRUNTIME_ONLY, test x$only_libdruntime = xyes) + # Enable expensive internal checks AC_ARG_ENABLE(libphobos-checking, [AS_HELP_STRING([[--enable-libphobos-checking[=LIST]]], |