libphobos: Add --with-libphobos-druntime-only option.
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 25 Mar 2020 08:38:58 +0000 (09:38 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sat, 18 Apr 2020 16:25:49 +0000 (18:25 +0200)
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.

58 files changed:
gcc/testsuite/gdc.test/runnable/builtin.d
gcc/testsuite/gdc.test/runnable/complex.d
gcc/testsuite/gdc.test/runnable/constfold.d
gcc/testsuite/gdc.test/runnable/foreach4.d
gcc/testsuite/gdc.test/runnable/ifti.d
gcc/testsuite/gdc.test/runnable/implicit.d
gcc/testsuite/gdc.test/runnable/inner.d
gcc/testsuite/gdc.test/runnable/interpret.d
gcc/testsuite/gdc.test/runnable/issue8671.d
gcc/testsuite/gdc.test/runnable/lazy.d
gcc/testsuite/gdc.test/runnable/mars1.d
gcc/testsuite/gdc.test/runnable/mixin1.d
gcc/testsuite/gdc.test/runnable/mixin2.d
gcc/testsuite/gdc.test/runnable/s2ir.d
gcc/testsuite/gdc.test/runnable/stress.d
gcc/testsuite/gdc.test/runnable/template4.d
gcc/testsuite/gdc.test/runnable/template9.d
gcc/testsuite/gdc.test/runnable/test10942.d
gcc/testsuite/gdc.test/runnable/test11.d
gcc/testsuite/gdc.test/runnable/test12.d
gcc/testsuite/gdc.test/runnable/test12197.d
gcc/testsuite/gdc.test/runnable/test15.d
gcc/testsuite/gdc.test/runnable/test22.d
gcc/testsuite/gdc.test/runnable/test23.d
gcc/testsuite/gdc.test/runnable/test24.d
gcc/testsuite/gdc.test/runnable/test27.d
gcc/testsuite/gdc.test/runnable/test28.d
gcc/testsuite/gdc.test/runnable/test34.d
gcc/testsuite/gdc.test/runnable/test37.d
gcc/testsuite/gdc.test/runnable/test42.d
gcc/testsuite/gdc.test/runnable/test5305.d
gcc/testsuite/gdc.test/runnable/test60.d
gcc/testsuite/gdc.test/runnable/testaa.d
gcc/testsuite/gdc.test/runnable/testbitarray.d
gcc/testsuite/gdc.test/runnable/testdstress.d
gcc/testsuite/gdc.test/runnable/testfile.d
gcc/testsuite/gdc.test/runnable/testformat.d
gcc/testsuite/gdc.test/runnable/testline.d
gcc/testsuite/gdc.test/runnable/testmmfile.d
gcc/testsuite/gdc.test/runnable/testscope2.d
gcc/testsuite/gdc.test/runnable/testsignals.d
gcc/testsuite/gdc.test/runnable/testsocket.d
gcc/testsuite/gdc.test/runnable/teststdio.d
gcc/testsuite/gdc.test/runnable/testthread2.d
gcc/testsuite/gdc.test/runnable/testtypeid.d
gcc/testsuite/gdc.test/runnable/traits.d
gcc/testsuite/gdc.test/runnable/wc.d
gcc/testsuite/gdc.test/runnable/wc2.d
gcc/testsuite/gdc.test/runnable/wc3.d
gcc/testsuite/gdc.test/runnable/xtest46.d
gcc/testsuite/gdc.test/runnable/xtest55.d
gcc/testsuite/lib/gdc-utils.exp
libphobos/configure
libphobos/configure.ac
libphobos/configure.tgt
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libphobos/testsuite/testsuite_flags.in

index 205e792879df567b54484200fb808ba49c33ea6a..d7ac356757ff6da6059cc6bab404acbc2c579724 100644 (file)
@@ -116,3 +116,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index e9c79cb7d21b94228f5ef87ec5dd646d384508b5..49bb3097aefc3ac6d74b29d8964f6aa26d050077 100644 (file)
@@ -460,3 +460,4 @@ int main(char[][] args)
     return 0;
 }
 
+// RUNNABLE_PHOBOS_TEST
index 0708056bc6661ebe3b1977c81263c6e4789520b6..d56f6c1357cb22141e0ab8c7fe7d89e328c9a559 100644 (file)
@@ -672,3 +672,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 32ac4663f1e27ffff10c31157dba6f07f4a3ada7..bf8eab45b0e61830b7d8709d25d80d73041855c2 100644 (file)
@@ -928,3 +928,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 9ea97a258edda2f3b876a475acb193a65d8bdff1..0e4edef89830a0dcf4d0dc7d267fc285f7105365 100644 (file)
@@ -118,3 +118,4 @@ void main() {
     }
 
 }
+// RUNNABLE_PHOBOS_TEST
index bc3f626f4d4ae4822fc064a10ed453f10639064d..89e6ac11b9fa2ee45b09055e523099d234635de9 100644 (file)
@@ -479,3 +479,4 @@ void main()
 
     writefln("Success");
 }
+// RUNNABLE_PHOBOS_TEST
index 592aaca24158c0064d022fd0a7ae2d56788e91af..40eb27d57990861d4ca2005d9eb4fdbd93203fc8 100644 (file)
@@ -916,3 +916,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 1dc902322dfb2bf9dc934683a976f68d1ae6db3b..eee3930d34bb07d9bca86b06c8b52a556d91d377 100644 (file)
@@ -3609,3 +3609,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index f9fa013e918fea2ca6ef2ccef1ef7050f631cb2e..8097e79d6bfed34b56efadb8e4cf2c267462b1a6 100644 (file)
@@ -3,3 +3,4 @@ void main()
 {
     double t = 1.0 - uniform(0.0, 1.0);
 }
+// RUNNABLE_PHOBOS_TEST
index 2fea5466dd880e47f712c5ae018f1cafab9f3c61..741877cb9703d30c42faa773d9efc32d685d750d 100644 (file)
@@ -308,3 +308,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 91d93dbf81ee438f385de20c10293015a6dbe390..b240745a51383710eeb1d390c7a2c581393d3053 100644 (file)
@@ -1723,3 +1723,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 5332ebbfecbfbc0c2eb903b130056498971b54a3..c16d943d20f3faf897c8f476f9a1f0219e1c624a 100644 (file)
@@ -1468,3 +1468,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 245e71ccc99d825d60dd2f4eb7360636ab815464..53a64d5f40ec95b89e3f2b6e6173f7f2a8511dd1 100644 (file)
@@ -361,3 +361,4 @@ void main()
 
     writeln("Success");
 }
+// RUNNABLE_PHOBOS_TEST
index ca832d262d0f41b438bb89252e473135ad013446..4c969b4b16f6c2659032753ee5a3de5795e911a9 100644 (file)
@@ -95,3 +95,4 @@ int main()
     writefln("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 2c7afe096c274f327f11edfa5fbea8cbe657d764..1b7f6457cf033f8b26619a97367e5d377193a584 100644 (file)
@@ -725,3 +725,4 @@ void CLASS()
         }
     }
 }
+// RUNNABLE_PHOBOS_TEST
index ab082d9f5d7d063c58b7fc30a2e88c0b675e6a69..84792dae6ae0bb045860a664da3a37fecce8e17f 100644 (file)
@@ -1164,3 +1164,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 0f1309fe581bef3c80153db7d03faa83add2e44b..0b11c6b4fa319b8016b929b498099f5a40dd3433 100644 (file)
@@ -4965,3 +4965,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index f85b4c9b9c8ec49f393bb8c5c9653366a3217600..612158fc294376208845362e19525e6c589ea2ed 100644 (file)
@@ -24,3 +24,4 @@ mixin(getEnum(1087));
 
 void main() { }
 
+// RUNNABLE_PHOBOS_TEST
index 5b21ba0fa51240ea5cb2490c219d1e73040c699b..e62ea97940a54c972258d25ccec5f49ac200f056 100644 (file)
@@ -1390,3 +1390,4 @@ int main(string[] argv)
 }
 
 
+// RUNNABLE_PHOBOS_TEST
index 2b1fb0e62f7b5dac50b5be7fd29da704785c3b1e..c196361a40143bc22090e9aef2bdad8945f675cd 100644 (file)
@@ -1250,3 +1250,4 @@ int main(string[] argv)
     return 0;
 }
 
+// RUNNABLE_PHOBOS_TEST
index 51dc36c83c8077184d07b3dc8543d298da614fda..52d44c94a2e25274025d15b3e00bf10b446b2acf 100644 (file)
@@ -10,3 +10,4 @@ void main()
     foo(a);
     assert(a[0] == 10000);
 }
+// RUNNABLE_PHOBOS_TEST
index d8bb3ae613ee613f226a2f91293b849826dde58f..75cd11ee8e7ddc59b86642050ddf71e0d9cfb397 100644 (file)
@@ -1439,3 +1439,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index e2d26e706b64305c1d9a8c0e7c89077335b1da6c..d15db1d86a99c18d51875e25ff17ffaa16544c4e 100644 (file)
@@ -1306,3 +1306,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index f43f6a4609163e15bf4ec709c59d557318cb56d3..dda2864fb48da0d39feb9e149c4d8f09fc9ffa99 100644 (file)
@@ -1566,3 +1566,4 @@ void main()
 
     printf("Success\n");
 }
+// RUNNABLE_PHOBOS_TEST
index 78e9150ea87441795400ee4eb11b73518052cbf0..cc6d6686d7a33e4c1bb7f94759a62880c48811f0 100644 (file)
@@ -8,3 +8,4 @@ void main()
 {
     string hi = std.string.format("%s", 3);
 }
+// RUNNABLE_PHOBOS_TEST
index b45c132620e929ec9c7779dad477fff0a00da6ee..3e5a462e4a56b32ff4226c079e1d23d5166381e4 100644 (file)
@@ -11,3 +11,4 @@ int main()
     return 0;
 }
 
+// RUNNABLE_PHOBOS_TEST
index c7ec6ad322887d9dc2d81625fb75dda674106797..1f7e7e89cf0b034ada4a31fd9aaea308bf46b280 100644 (file)
@@ -1318,3 +1318,4 @@ void main()
     printf("Success\n");
 }
 
+// RUNNABLE_PHOBOS_TEST
index 5c28d0f8252424d5038d08d0e6acb632005f6fd0..e92f3d6e3406a6b09ecffc00d3d824fe0c6b7e70 100644 (file)
@@ -1292,3 +1292,4 @@ void main()
 }
 
 
+// RUNNABLE_PHOBOS_TEST
index 97448d1d2ca640984856e13a5b897d7a276b0876..c28d30f2ae923aadbbad09a38ab60b3f0a44d008 100644 (file)
@@ -11,3 +11,4 @@ void main()
     // imports in a subdirectory of the -J path
     writefln(import("std14198/uni.d"));
 }
+// RUNNABLE_PHOBOS_TEST
index 6e0c42b6ff55edb017021a5383369290782496c7..2bb04580a7d93bcdbe938f0f70c2c444dfa53228 100644 (file)
@@ -6438,3 +6438,4 @@ int main()
     return 0;
 }
 
+// RUNNABLE_PHOBOS_TEST
index e1c274d31ca64d1daa19c83322b99683e1929d41..9102cba91f21fc4baa6fbb64f843587dcc53962e 100644 (file)
@@ -5,3 +5,4 @@ void map(real function(real) f) { }
 int main() { map(&sqrt); return 0; }
 
 
+// RUNNABLE_PHOBOS_TEST
index e55f05c1e6678f108229a4d9f1979d24726e02b1..ab967329f083a0fadf1ed16ac1549db941be42d9 100644 (file)
@@ -20,3 +20,4 @@ void main()
 
     writeln("Success");
 }
+// RUNNABLE_PHOBOS_TEST
index d069e79e820801fccc1a9833213ed1f8d4520256..6e28e894cf2f20068cdaf1652adfa2ef81590ac5 100644 (file)
@@ -1383,3 +1383,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 02044603e881652cab29274f052d8143f31d4cc5..118388bebd1cbc1fdc2dacac333e7b6557dd516c 100644 (file)
@@ -14,3 +14,4 @@ void main() {
 }
 
 
+// RUNNABLE_PHOBOS_TEST
index ee36d345b1d8de2f1ad34cf6984ee77f020307bc..097fc310d3405c90cf143e832f0cad5c31c12179 100644 (file)
@@ -930,3 +930,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 7005900861673c4ed21f4b4b1c798186f9b81948..e7c3e19a49daba044c096bd504bd5a8197ff60dd 100644 (file)
@@ -22,3 +22,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index e209b855b59d9de8b8caa96ce428a4fe13484c63..2cb0da9fc4d4f158ea2043d8e371772aa260bacd 100644 (file)
@@ -123,3 +123,4 @@ int main()
     std.stdio.writefln("Success");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 22117bd385c50568ee1420dec2d841c07982e981..5001fc2fa681a8b22fc49c0c0e4e4d0fc80c9763 100644 (file)
@@ -41,3 +41,4 @@ void checkFileSpec(Object o){
 writeln(str);
         assert(str[start .. start+3]=="(1)");
 }
+// RUNNABLE_PHOBOS_TEST
index f0b3340905a520aa697ec03ba02c69a5579dd2e3..1ae98df9178b7db4036d4d008485d8f9400b76b3 100644 (file)
@@ -117,3 +117,4 @@ int main()
 
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index ae4e3d7249c9205aacadcff59a92e9ad7d0a3c77..cde02ab405f21d2a8f3c19b3d74704654040136a 100644 (file)
@@ -246,3 +246,4 @@ void main()
     printf("Success\n");
 }
 
+// RUNNABLE_PHOBOS_TEST
index 619be73d2f87ae29f4ea65d1570491ded5fbdbe8..a43f89295e8fce33b0086f445cbf1c10d8647995 100644 (file)
@@ -111,3 +111,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 3d153d61b0e43f9a0198e09d1864079ea52268aa..00b757a896b6c73af73186ac04612f7aed52e2fa 100644 (file)
@@ -48,3 +48,4 @@ int main ()
 }
 
 
+// RUNNABLE_PHOBOS_TEST
index b5cc44480dca51abcb8d00a020080d2d26a4a003..854dcb5ae382b5216b7ead7e7f5d49982bae5358 100644 (file)
@@ -31,3 +31,4 @@ void main()
     } while (!feof(fp));
     //fclose(fp);
 }
+// RUNNABLE_PHOBOS_TEST
index 008d4253a5a3307c50ba5388b420a59d61f4dffa..0ec6e0dbcdcd68ede000179e5764c0bcda7edbe2 100644 (file)
@@ -106,3 +106,4 @@ void main() {
     }
 }
 
+// RUNNABLE_PHOBOS_TEST
index 936dfaae7785e974445ea995e119f06eb0102fbc..dcaac731fa3182b8cb5bceae0ea464bb9c46b082 100644 (file)
@@ -684,3 +684,4 @@ int main()
 
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index b73ee01ce425780768712e55572b882660694c40..915f16da48efe5f52a320c736bfde1fb720d14d8 100644 (file)
@@ -1606,3 +1606,4 @@ int main()
     writeln("Success");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 7ee35861a40bf7c15122f8002807978e7687bea4..e5fd98a0f835486d2148ccbd769a745788838a27 100644 (file)
@@ -48,3 +48,4 @@ int main (string[] args)
     }
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 6229627843f950e99bf54e1afc5a73f52d77acaf..780f5f160eaf91ee01462c57b652a5c83cb95331 100644 (file)
@@ -72,3 +72,4 @@ int main (string[] args)
     }
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 3cb4e25c235b1907160d4340aae7cf22047df6fc..666bfb99113a5c92252a7b6a0c8195b50b072c61 100644 (file)
@@ -70,3 +70,4 @@ int main (string[] args)
     }
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index b3caffda1333be21378d0c1d8dcd3e052af515d4..e1cdbcd1922d8274e664ade9c53506ca4126e97d 100644 (file)
@@ -8283,3 +8283,4 @@ int main()
     printf("Success\n");
     return 0;
 }
+// RUNNABLE_PHOBOS_TEST
index 3d41b997808c03e80d3473736913c4dbd1417a0f..1062a1a77fc245c7ded633e6424515894d7ac942 100644 (file)
@@ -22,3 +22,4 @@ int main()
     return 0;
 }
 
+// RUNNABLE_PHOBOS_TEST
index 31a4cf0b5e2494c982f5c1e141df9e9bd493bc61..87d1105a9dbe683839ea94cfb9b978548cfcceed 100644 (file)
@@ -208,6 +208,7 @@ proc gdc-convert-test { base test } {
 
     set extra_sources ""
     set extra_files ""
+    set needs_phobos 0
 
     upvar 1 compilable_do_what compilable_do_what
     set compilable_output_file_ext ""
@@ -296,6 +297,11 @@ proc gdc-convert-test { base test } {
            }
            regsub -- {COMPILED_IMPORTS.*$} $copy_line "" out_line
 
+       } elseif [regexp -- {RUNNABLE_PHOBOS_TEST} $copy_line match sources] {
+           # RUNNABLE_PHOBOS_TEST annotates tests that import the std module.
+           # It will need skipping if phobos is not available on the target.
+           regsub -- {RUNNABLE_PHOBOS_TEST.*$} $copy_line "" out_line
+           set needs_phobos 1
        }
 
        puts $fdout $out_line
@@ -331,6 +337,9 @@ proc gdc-convert-test { base test } {
            if ![isnative] {
                puts $fdout "// { dg-final { output-exists } }"
            }
+           if $needs_phobos {
+               puts $fdout "// { dg-skip-if \"imports phobos\" { ! d_runtime_has_std_library } }"
+           }
        }
 
        compilable {
index a6f5aec2bfd08b1480d6a067559e213a6596d066..2dcf15ed85275284a2753299ee05657715901d50 100755 (executable)
@@ -638,6 +638,8 @@ GDCFLAGSX
 libtool_VERSION
 SPEC_PHOBOS_DEPS
 CHECKING_DFLAGS
+ENABLE_LIBDRUNTIME_ONLY_FALSE
+ENABLE_LIBDRUNTIME_ONLY_TRUE
 ENABLE_LIBPHOBOS_FALSE
 ENABLE_LIBPHOBOS_TRUE
 gdc_include_dir
@@ -840,6 +842,7 @@ with_cross_host
 enable_version_specific_runtime_libs
 with_toolexeclibdir
 enable_libphobos
+with_libdruntime_only
 enable_libphobos_checking
 '
       ac_precious_vars='build_alias
@@ -1509,6 +1512,8 @@ Optional Packages:
   --with-toolexeclibdir=DIR
                           install libraries built with a cross compiler within
                           DIR
+  --with-libphobos-druntime-only={yes,no,auto}
+                          build only the druntime library (default: auto)
 
 Some influential environment variables:
   CC          C compiler command
@@ -11645,7 +11650,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11648 "configure"
+#line 11653 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11751,7 +11756,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11754 "configure"
+#line 11759 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libphobos" >&5
 $as_echo "$enable_libphobos" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libphobos-druntime-only" >&5
+$as_echo_n "checking for --with-libphobos-druntime-only... " >&6; }
+
+# Check whether --with-libdruntime-only was given.
+if test "${with_libdruntime_only+set}" = set; then :
+  withval=$with_libdruntime_only;
+else
+  with_libdruntime_only=auto
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libdruntime_only" >&5
+$as_echo "$with_libdruntime_only" >&6; }
+
+case "$with_libdruntime_only" in
+  yes|no|auto) ;;
+  *) as_fn_error $? "Invalid argument for --with-libphobos-druntime-only" "$LINENO" 5 ;;
+esac
+
 # See if supported.
 unset LIBPHOBOS_SUPPORTED
+unset LIBDRUNTIME_ONLY
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for host support for libphobos" >&5
 $as_echo_n "checking for host support for libphobos... " >&6; }
 . ${srcdir}/configure.tgt
@@ -15274,6 +15298,22 @@ else
 fi
 
 
+# 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
+ if test x$only_libdruntime = xyes; then
+  ENABLE_LIBDRUNTIME_ONLY_TRUE=
+  ENABLE_LIBDRUNTIME_ONLY_FALSE='#'
+else
+  ENABLE_LIBDRUNTIME_ONLY_TRUE='#'
+  ENABLE_LIBDRUNTIME_ONLY_FALSE=
+fi
+
+
 # Enable expensive internal checks
 # Check whether --enable-libphobos-checking was given.
 if test "${enable_libphobos_checking+set}" = set; then :
@@ -15577,6 +15617,10 @@ if test -z "${ENABLE_LIBPHOBOS_TRUE}" && test -z "${ENABLE_LIBPHOBOS_FALSE}"; th
   as_fn_error $? "conditional \"ENABLE_LIBPHOBOS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_LIBDRUNTIME_ONLY_TRUE}" && test -z "${ENABLE_LIBDRUNTIME_ONLY_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_LIBDRUNTIME_ONLY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
index ffd12981d0bd60bed7e5006198d7bf7ab36a4c67..8c89ebd23b08f7b0bef005b21ad513efc8f1abb4 100644 (file)
@@ -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]]],
index 8ef552a3332e695b448403797a3f12029b03dd90..66082e36fad795ae3a6906bdbced3b9171e0f141 100644 (file)
@@ -22,6 +22,7 @@
 # Disable the libphobos or libdruntime components on untested or known
 # broken systems.  More targets shall be added after testing.
 LIBPHOBOS_SUPPORTED=no
+LIBDRUNTIME_ONLY=auto
 case "${target}" in
   aarch64*-*-linux*)
        LIBPHOBOS_SUPPORTED=yes
index 51e3f5015654c9db9d99d1d961be8e123da08c8a..9fb416ecc32f4f0f5045ef3e737fdb79c40088a2 100644 (file)
@@ -70,6 +70,12 @@ install-data-local:
 # https://gist.github.com/jpf91/8744acebc9dcf1e9d1a35cdff20afbb2
 # Can't use wildcards here:
 # https://www.gnu.org/software/automake/manual/html_node/Wildcards.html
+if ENABLE_LIBDRUNTIME_ONLY
+
+PHOBOS_DSOURCES =
+
+else
+
 PHOBOS_DSOURCES = etc/c/curl.d etc/c/sqlite3.d etc/c/zlib.d \
        std/algorithm/comparison.d std/algorithm/internal.d \
        std/algorithm/iteration.d std/algorithm/mutation.d \
@@ -132,3 +138,5 @@ PHOBOS_DSOURCES = etc/c/curl.d etc/c/sqlite3.d etc/c/zlib.d \
        std/utf.d std/uuid.d std/variant.d std/windows/charset.d \
        std/windows/registry.d std/windows/syserror.d std/xml.d std/zip.d \
        std/zlib.d
+
+endif
index da9ba834c4bf657431433d107c3726307e2feb07..e1b0588a690b35dc0b9ad338cf4ea72fedd59a38 100644 (file)
@@ -145,77 +145,122 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
 LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 am__dirstamp = $(am__leading_dot)dirstamp
-am__objects_1 = etc/c/curl.lo etc/c/sqlite3.lo etc/c/zlib.lo \
-       std/algorithm/comparison.lo std/algorithm/internal.lo \
-       std/algorithm/iteration.lo std/algorithm/mutation.lo \
-       std/algorithm/package.lo std/algorithm/searching.lo \
-       std/algorithm/setops.lo std/algorithm/sorting.lo std/array.lo \
-       std/ascii.lo std/base64.lo std/bigint.lo std/bitmanip.lo \
-       std/compiler.lo std/complex.lo std/concurrency.lo \
-       std/container/array.lo std/container/binaryheap.lo \
-       std/container/dlist.lo std/container/package.lo \
-       std/container/rbtree.lo std/container/slist.lo \
-       std/container/util.lo std/conv.lo std/csv.lo \
-       std/datetime/date.lo std/datetime/interval.lo \
-       std/datetime/package.lo std/datetime/stopwatch.lo \
-       std/datetime/systime.lo std/datetime/timezone.lo \
-       std/demangle.lo std/digest/crc.lo std/digest/digest.lo \
-       std/digest/hmac.lo std/digest/md.lo std/digest/murmurhash.lo \
-       std/digest/package.lo std/digest/ripemd.lo std/digest/sha.lo \
-       std/encoding.lo std/exception.lo \
-       std/experimental/allocator/building_blocks/affix_allocator.lo \
-       std/experimental/allocator/building_blocks/allocator_list.lo \
-       std/experimental/allocator/building_blocks/bitmapped_block.lo \
-       std/experimental/allocator/building_blocks/bucketizer.lo \
-       std/experimental/allocator/building_blocks/fallback_allocator.lo \
-       std/experimental/allocator/building_blocks/free_list.lo \
-       std/experimental/allocator/building_blocks/free_tree.lo \
-       std/experimental/allocator/building_blocks/kernighan_ritchie.lo \
-       std/experimental/allocator/building_blocks/null_allocator.lo \
-       std/experimental/allocator/building_blocks/package.lo \
-       std/experimental/allocator/building_blocks/quantizer.lo \
-       std/experimental/allocator/building_blocks/region.lo \
-       std/experimental/allocator/building_blocks/scoped_allocator.lo \
-       std/experimental/allocator/building_blocks/segregator.lo \
-       std/experimental/allocator/building_blocks/stats_collector.lo \
-       std/experimental/allocator/common.lo \
-       std/experimental/allocator/gc_allocator.lo \
-       std/experimental/allocator/mallocator.lo \
-       std/experimental/allocator/mmap_allocator.lo \
-       std/experimental/allocator/package.lo \
-       std/experimental/allocator/showcase.lo \
-       std/experimental/allocator/typed.lo \
-       std/experimental/checkedint.lo std/experimental/logger/core.lo \
-       std/experimental/logger/filelogger.lo \
-       std/experimental/logger/multilogger.lo \
-       std/experimental/logger/nulllogger.lo \
-       std/experimental/logger/package.lo \
-       std/experimental/typecons.lo std/file.lo std/format.lo \
-       std/functional.lo std/getopt.lo std/internal/cstring.lo \
-       std/internal/math/biguintcore.lo \
-       std/internal/math/biguintnoasm.lo \
-       std/internal/math/errorfunction.lo \
-       std/internal/math/gammafunction.lo std/internal/scopebuffer.lo \
-       std/internal/test/dummyrange.lo std/internal/test/range.lo \
-       std/internal/test/uda.lo std/internal/unicode_comp.lo \
-       std/internal/unicode_decomp.lo \
-       std/internal/unicode_grapheme.lo std/internal/unicode_norm.lo \
-       std/internal/unicode_tables.lo \
-       std/internal/windows/advapi32.lo std/json.lo std/math.lo \
-       std/mathspecial.lo std/meta.lo std/mmfile.lo std/net/curl.lo \
-       std/net/isemail.lo std/numeric.lo std/outbuffer.lo \
-       std/parallelism.lo std/path.lo std/process.lo std/random.lo \
-       std/range/interfaces.lo std/range/package.lo \
-       std/range/primitives.lo std/regex/internal/backtracking.lo \
-       std/regex/internal/generator.lo std/regex/internal/ir.lo \
-       std/regex/internal/kickstart.lo std/regex/internal/parser.lo \
-       std/regex/internal/tests.lo std/regex/internal/thompson.lo \
-       std/regex/package.lo std/signals.lo std/socket.lo \
-       std/stdint.lo std/stdio.lo std/string.lo std/system.lo \
-       std/traits.lo std/typecons.lo std/typetuple.lo std/uni.lo \
-       std/uri.lo std/utf.lo std/uuid.lo std/variant.lo \
-       std/windows/charset.lo std/windows/registry.lo \
-       std/windows/syserror.lo std/xml.lo std/zip.lo std/zlib.lo
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@am__objects_1 = etc/c/curl.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        etc/c/sqlite3.lo etc/c/zlib.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/comparison.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/internal.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/iteration.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/mutation.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/searching.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/setops.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/sorting.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/array.lo std/ascii.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/base64.lo std/bigint.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/bitmanip.lo std/compiler.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/complex.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/concurrency.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/array.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/binaryheap.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/dlist.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/rbtree.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/slist.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/util.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/conv.lo std/csv.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/date.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/interval.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/stopwatch.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/systime.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/timezone.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/demangle.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/crc.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/digest.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/hmac.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/md.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/murmurhash.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/ripemd.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/sha.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/encoding.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/exception.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/affix_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/allocator_list.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/bitmapped_block.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/bucketizer.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/fallback_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/free_list.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/free_tree.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/kernighan_ritchie.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/null_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/quantizer.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/region.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/scoped_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/segregator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/stats_collector.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/common.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/gc_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/mallocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/mmap_allocator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/showcase.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/typed.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/checkedint.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/core.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/filelogger.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/multilogger.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/nulllogger.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/typecons.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/file.lo std/format.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/functional.lo std/getopt.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/cstring.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/biguintcore.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/biguintnoasm.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/errorfunction.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/gammafunction.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/scopebuffer.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/test/dummyrange.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/test/range.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/test/uda.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_comp.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_decomp.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_grapheme.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_norm.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_tables.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/windows/advapi32.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/json.lo std/math.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/mathspecial.lo std/meta.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/mmfile.lo std/net/curl.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/net/isemail.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/numeric.lo std/outbuffer.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/parallelism.lo std/path.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/process.lo std/random.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/range/interfaces.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/range/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/range/primitives.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/backtracking.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/generator.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/ir.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/kickstart.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/parser.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/tests.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/thompson.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/package.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/signals.lo std/socket.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/stdint.lo std/stdio.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/string.lo std/system.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/traits.lo std/typecons.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/typetuple.lo std/uni.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/uri.lo std/utf.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/uuid.lo std/variant.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/windows/charset.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/windows/registry.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/windows/syserror.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/xml.lo std/zip.lo \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/zlib.lo
 am__objects_2 = $(am__objects_1)
 am__objects_3 = $(am__objects_2)
 am_libgphobos_la_OBJECTS = $(am__objects_3)
@@ -461,74 +506,75 @@ libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
        $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
 
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@PHOBOS_DSOURCES = etc/c/curl.d etc/c/sqlite3.d etc/c/zlib.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/comparison.d std/algorithm/internal.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/iteration.d std/algorithm/mutation.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/package.d std/algorithm/searching.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/algorithm/setops.d std/algorithm/sorting.d std/array.d std/ascii.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/base64.d std/bigint.d std/bitmanip.d std/compiler.d std/complex.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/concurrency.d std/container/array.d std/container/binaryheap.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/dlist.d std/container/package.d std/container/rbtree.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/container/slist.d std/container/util.d std/conv.d std/csv.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/date.d std/datetime/interval.d std/datetime/package.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/stopwatch.d std/datetime/systime.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/datetime/timezone.d std/demangle.d std/digest/crc.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/digest.d std/digest/hmac.d std/digest/md.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/murmurhash.d std/digest/package.d std/digest/ripemd.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/digest/sha.d std/encoding.d std/exception.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/affix_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/allocator_list.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/bitmapped_block.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/bucketizer.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/fallback_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/free_list.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/free_tree.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/kernighan_ritchie.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/null_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/package.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/quantizer.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/region.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/scoped_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/segregator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/building_blocks/stats_collector.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/common.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/gc_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/mallocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/mmap_allocator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/package.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/showcase.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/allocator/typed.d std/experimental/checkedint.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/core.d std/experimental/logger/filelogger.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/multilogger.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/logger/nulllogger.d std/experimental/logger/package.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/experimental/typecons.d std/file.d std/format.d std/functional.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/getopt.d std/internal/cstring.d std/internal/math/biguintcore.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/biguintnoasm.d std/internal/math/errorfunction.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/math/gammafunction.d std/internal/scopebuffer.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/test/dummyrange.d std/internal/test/range.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/test/uda.d std/internal/unicode_comp.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_decomp.d std/internal/unicode_grapheme.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/unicode_norm.d std/internal/unicode_tables.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/internal/windows/advapi32.d std/json.d std/math.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/mathspecial.d std/meta.d std/mmfile.d std/net/curl.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/net/isemail.d std/numeric.d std/outbuffer.d std/parallelism.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/path.d std/process.d std/random.d std/range/interfaces.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/range/package.d std/range/primitives.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/backtracking.d std/regex/internal/generator.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/ir.d std/regex/internal/kickstart.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/parser.d std/regex/internal/tests.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/regex/internal/thompson.d std/regex/package.d std/signals.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/socket.d std/stdint.d std/stdio.d std/string.d std/system.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/traits.d std/typecons.d std/typetuple.d std/uni.d std/uri.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/utf.d std/uuid.d std/variant.d std/windows/charset.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/windows/registry.d std/windows/syserror.d std/xml.d std/zip.d \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@        std/zlib.d
+
 
 # Source file definitions. Boring stuff, auto-generated with
 # https://gist.github.com/jpf91/8744acebc9dcf1e9d1a35cdff20afbb2
 # Can't use wildcards here:
 # https://www.gnu.org/software/automake/manual/html_node/Wildcards.html
-PHOBOS_DSOURCES = etc/c/curl.d etc/c/sqlite3.d etc/c/zlib.d \
-       std/algorithm/comparison.d std/algorithm/internal.d \
-       std/algorithm/iteration.d std/algorithm/mutation.d \
-       std/algorithm/package.d std/algorithm/searching.d \
-       std/algorithm/setops.d std/algorithm/sorting.d std/array.d std/ascii.d \
-       std/base64.d std/bigint.d std/bitmanip.d std/compiler.d std/complex.d \
-       std/concurrency.d std/container/array.d std/container/binaryheap.d \
-       std/container/dlist.d std/container/package.d std/container/rbtree.d \
-       std/container/slist.d std/container/util.d std/conv.d std/csv.d \
-       std/datetime/date.d std/datetime/interval.d std/datetime/package.d \
-       std/datetime/stopwatch.d std/datetime/systime.d \
-       std/datetime/timezone.d std/demangle.d std/digest/crc.d \
-       std/digest/digest.d std/digest/hmac.d std/digest/md.d \
-       std/digest/murmurhash.d std/digest/package.d std/digest/ripemd.d \
-       std/digest/sha.d std/encoding.d std/exception.d \
-       std/experimental/allocator/building_blocks/affix_allocator.d \
-       std/experimental/allocator/building_blocks/allocator_list.d \
-       std/experimental/allocator/building_blocks/bitmapped_block.d \
-       std/experimental/allocator/building_blocks/bucketizer.d \
-       std/experimental/allocator/building_blocks/fallback_allocator.d \
-       std/experimental/allocator/building_blocks/free_list.d \
-       std/experimental/allocator/building_blocks/free_tree.d \
-       std/experimental/allocator/building_blocks/kernighan_ritchie.d \
-       std/experimental/allocator/building_blocks/null_allocator.d \
-       std/experimental/allocator/building_blocks/package.d \
-       std/experimental/allocator/building_blocks/quantizer.d \
-       std/experimental/allocator/building_blocks/region.d \
-       std/experimental/allocator/building_blocks/scoped_allocator.d \
-       std/experimental/allocator/building_blocks/segregator.d \
-       std/experimental/allocator/building_blocks/stats_collector.d \
-       std/experimental/allocator/common.d \
-       std/experimental/allocator/gc_allocator.d \
-       std/experimental/allocator/mallocator.d \
-       std/experimental/allocator/mmap_allocator.d \
-       std/experimental/allocator/package.d \
-       std/experimental/allocator/showcase.d \
-       std/experimental/allocator/typed.d std/experimental/checkedint.d \
-       std/experimental/logger/core.d std/experimental/logger/filelogger.d \
-       std/experimental/logger/multilogger.d \
-       std/experimental/logger/nulllogger.d std/experimental/logger/package.d \
-       std/experimental/typecons.d std/file.d std/format.d std/functional.d \
-       std/getopt.d std/internal/cstring.d std/internal/math/biguintcore.d \
-       std/internal/math/biguintnoasm.d std/internal/math/errorfunction.d \
-       std/internal/math/gammafunction.d std/internal/scopebuffer.d \
-       std/internal/test/dummyrange.d std/internal/test/range.d \
-       std/internal/test/uda.d std/internal/unicode_comp.d \
-       std/internal/unicode_decomp.d std/internal/unicode_grapheme.d \
-       std/internal/unicode_norm.d std/internal/unicode_tables.d \
-       std/internal/windows/advapi32.d std/json.d std/math.d \
-       std/mathspecial.d std/meta.d std/mmfile.d std/net/curl.d \
-       std/net/isemail.d std/numeric.d std/outbuffer.d std/parallelism.d \
-       std/path.d std/process.d std/random.d std/range/interfaces.d \
-       std/range/package.d std/range/primitives.d \
-       std/regex/internal/backtracking.d std/regex/internal/generator.d \
-       std/regex/internal/ir.d std/regex/internal/kickstart.d \
-       std/regex/internal/parser.d std/regex/internal/tests.d \
-       std/regex/internal/thompson.d std/regex/package.d std/signals.d \
-       std/socket.d std/stdint.d std/stdio.d std/string.d std/system.d \
-       std/traits.d std/typecons.d std/typetuple.d std/uni.d std/uri.d \
-       std/utf.d std/uuid.d std/variant.d std/windows/charset.d \
-       std/windows/registry.d std/windows/syserror.d std/xml.d std/zip.d \
-       std/zlib.d
-
+@ENABLE_LIBDRUNTIME_ONLY_TRUE@PHOBOS_DSOURCES = 
 all: all-am
 
 .SUFFIXES:
index c5dcac2054f6c007d81e98c167cc9c10cc683768..43e42810434a317e02aee1ee15b25d70cac1bb03 100755 (executable)
@@ -35,8 +35,11 @@ case ${query} in
       GDCPATHS_default="-nostdinc"
       GDCPATHS_config="-B${BUILD_DIR}/src
                        -I${BUILD_DIR}/libdruntime
-                       -I${SRC_DIR}/libdruntime
-                       -I${SRC_DIR}/src"
+                       -I${SRC_DIR}/libdruntime"
+      # Include phobos in search path if compiling in library.
+      if [ "x@ENABLE_LIBDRUNTIME_ONLY_FALSE@" = "x" ]; then
+         GDCPATHS_config="${GDCPATHS_config} -I${SRC_DIR}/src"
+      fi
       echo ${GDCPATHS_default} ${GDCPATHS_config}
       ;;
     --gdcldflags)