From cecd06a9eabc373253e9e268989796eea088ffa2 Mon Sep 17 00:00:00 2001 From: Johannes Pfau Date: Thu, 25 Apr 2019 11:22:27 +0000 Subject: [PATCH] D: Do not add target_libs if phobos is disabled From-SVN: r270571 --- gcc/d/ChangeLog | 4 ++++ gcc/d/config-lang.in | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index a0a3266f1a2..d5b53679c8c 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,7 @@ +2019-04-25 Johannes Pfau + + * config-lang.in: Do not add target_libs if phobos is disabled. + 2019-04-23 Iain Buclaw Robin Dapp diff --git a/gcc/d/config-lang.in b/gcc/d/config-lang.in index 3fe1ac42f92..a3f78c7e6f9 100644 --- a/gcc/d/config-lang.in +++ b/gcc/d/config-lang.in @@ -25,7 +25,25 @@ language="d" compilers="d21\$(exeext)" -target_libs="target-libphobos target-zlib target-libbacktrace" +phobos_target_deps="target-zlib target-libbacktrace" +phobos_target_libs="target-libphobos $phobos_target_deps" + +case "${noconfigdirs}" in + # Check if phobos was disabled as unsupported + *target-libphobos*) + disabled_target_libs="$disabled_target_libs $phobos_target_deps" + ;; + *) + # The --disable- handler in configure.ac is called after + # config-lang.in. So when using --disable-libphobos, it has not been + # added to noconfigdirs here yet + if test x${enable_libphobos} != xno; then + target_libs="$phobos_target_libs" + else + disabled_target_libs="$disabled_target_libs $phobos_target_libs" + fi + ;; +esac gtfiles="\$(srcdir)/d/d-tree.h \$(srcdir)/d/d-builtins.cc \$(srcdir)/d/d-lang.cc \$(srcdir)/d/modules.cc \$(srcdir)/d/typeinfo.cc" -- 2.30.2