[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
This commit is contained in:
Tomas Lindquist Olsen
2007-10-03 05:41:15 +02:00
parent 766fc30a30
commit 8d542addd9
5 changed files with 12 additions and 1 deletions

Binary file not shown.

BIN
lib/lphobos.bc Normal file

Binary file not shown.

View File

@@ -6,6 +6,7 @@ else
dc_cmd="llvmdc"
fi
# build runtime
$dc_cmd internal/contract.d \
internal/arrays.d \
internal/moduleinit.d \
@@ -19,6 +20,10 @@ llvm-link -f -o=obj/all.bc obj/contract.bc obj/arrays.bc obj/moduleinit.bc obj/o
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

6
test/imports2.d Normal file
View File

@@ -0,0 +1,6 @@
module test;
import std.stdio;
void main() {
writefln("Hello world!"[]);
}

View File

@@ -17,7 +17,7 @@ elif [ "$2" = "llopt" ]; then
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