changeset 16:860524276608 trunk

[svn r20] * Added a simple compiletime std.stdio by downs * Added a simple lphobos of std.stdio (so far) * 'tester.sh run' now links to lphobos
author lindquist
date Wed, 03 Oct 2007 05:41:15 +0200
parents 37a4fdab33fc
children 6c6cd097bcdf
files lib/llvmdcore.bc lib/lphobos.bc lphobos/build.sh test/imports2.d tester.sh
diffstat 5 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
Binary file lib/llvmdcore.bc has changed
Binary file lib/lphobos.bc has changed
--- a/lphobos/build.sh	Wed Oct 03 04:56:32 2007 +0200
+++ b/lphobos/build.sh	Wed Oct 03 05:41:15 2007 +0200
@@ -6,6 +6,7 @@
 dc_cmd="llvmdc"
 fi
 
+# build runtime
 $dc_cmd internal/contract.d \
         internal/arrays.d \
         internal/moduleinit.d \
@@ -19,6 +20,10 @@
 
 opt -f -std-compile-opts -o=../lib/llvmdcore.bc obj/all.bc || exit 1
 
+# build phobos
+$dc_cmd std/stdio.d -c -odobj || exit 1
+llvm-link -f -o=../lib/lphobos.bc obj/stdio.bc || exit 1
+
 if [ "$1" = "ll" ]; then
     llvm-dis -f -o=all.ll ../lib/llvmdcore.bc || exit 1
 fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/imports2.d	Wed Oct 03 05:41:15 2007 +0200
@@ -0,0 +1,6 @@
+module test;
+import std.stdio;
+
+void main() {
+    writefln("Hello world!"[]);
+}
--- a/tester.sh	Wed Oct 03 04:56:32 2007 +0200
+++ b/tester.sh	Wed Oct 03 05:41:15 2007 +0200
@@ -17,7 +17,7 @@
     cat $1.ll
     exit $?
 elif [ "$2" = "run" ]; then
-    llvmdc $1 -Itest -odtest -of$1 &&
+    llvmdc $1 lib/lphobos.bc -Itest -odtest -of$1 &&
     $1
     exit $?
 elif [ "$2" = "c" ]; then