mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-31 03:53:14 +01:00
[svn r9] added a preliminary rebuild profile. llvmdc-posix - very handy :)
added readme.txt added test/g.d - tests passing strings to functions fixed test/dgs.d and test/funcptr, now all tests except those related to typeinfo should work.
This commit is contained in:
@@ -920,7 +920,7 @@ elem* CallExp::toElem(IRState* p)
|
||||
assert(llargs[j] != 0);
|
||||
}
|
||||
else {
|
||||
llargs[j] = arg->mem;
|
||||
llargs[j] = arg->mem ? arg->mem : arg->val;
|
||||
assert(llargs[j] != 0);
|
||||
}
|
||||
|
||||
|
||||
67
llvmdc-posix
Normal file
67
llvmdc-posix
Normal file
@@ -0,0 +1,67 @@
|
||||
#profile=phobos
|
||||
|
||||
compiler=llvmdc
|
||||
inifile=llvmdc.conf
|
||||
|
||||
exeext=
|
||||
objext=bc
|
||||
|
||||
|
||||
version=LLVM
|
||||
noversion=DigitalMars
|
||||
noversion=GNU
|
||||
testversion=linux
|
||||
testversion=Unix
|
||||
version=Posix
|
||||
testversion=Windows
|
||||
testversion=Win32
|
||||
testversion=Win64
|
||||
testversion=X86
|
||||
testversion=PPC
|
||||
testversion=X86_64
|
||||
testversion=PPC64
|
||||
testversion=D_InlineAsm
|
||||
testvestion=D_InlineAsm_X86
|
||||
testversion=D_InlineAsm_PPC
|
||||
testversion=D_InlineAsm_X86_64
|
||||
testversion=D_InlineAsm_PPC64
|
||||
testversion=LittleEndian
|
||||
testversion=BigEndian
|
||||
|
||||
|
||||
[compile]
|
||||
cmd=llvmdc -version=Posix -c $i
|
||||
|
||||
flag=$i
|
||||
incdir=-I$i
|
||||
libdir=-L-L$i
|
||||
optimize=-O5
|
||||
version=-version=$i
|
||||
|
||||
|
||||
[link]
|
||||
cmd=llvdc $i -of$o
|
||||
|
||||
libdir=-L-L$i
|
||||
lib=-L-l$i
|
||||
flag=-L$i
|
||||
|
||||
|
||||
[liblink]
|
||||
safe=yes
|
||||
cmd=ar rc $o $i
|
||||
|
||||
libdir=
|
||||
lib=
|
||||
flag=
|
||||
|
||||
|
||||
[postliblink]
|
||||
cmd=ranlib $i
|
||||
|
||||
|
||||
[shliblink]
|
||||
shlibs=no
|
||||
|
||||
[dyliblink]
|
||||
dylibs=no
|
||||
20
readme.txt
Normal file
20
readme.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
LLVM D Compiler (LLVMDC)
|
||||
|
||||
This compiler is based on the Digital Mars D (DMD)[1] compiler frontend, and
|
||||
the LLVM[2] compiler toolkit. It is licensed under the same licence as the DMD
|
||||
compiler frontend. See dmd/readme.txt for more details.
|
||||
|
||||
premake[3] is used to generate a makefile so the project can be built. So far
|
||||
only Linux is tested so use the command: 'premake --target gnu' to generate a
|
||||
Makefile, then just type 'make'.
|
||||
|
||||
You need LLVM 2.1 which is not yet released, so LLVM from SVN is required.
|
||||
Current development has been done against the 20070814 revision, newer will
|
||||
probably work, later probably wont...
|
||||
|
||||
Many thing are still not implemented. For more information visit the website:
|
||||
http://www.dsource.org/projects/llvmdc
|
||||
|
||||
[1] http://www.digitalmars.com/d
|
||||
[2] http://www.llvm.org
|
||||
[3] http://premake.sourceforge.net
|
||||
13
test/g.d
Normal file
13
test/g.d
Normal file
@@ -0,0 +1,13 @@
|
||||
module g;
|
||||
|
||||
void func(char[] str)
|
||||
{
|
||||
printf("%.*s\n", str.length, str.ptr);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
char[] arr = "Hello World!";
|
||||
func(arr);
|
||||
func("ditto");
|
||||
}
|
||||
Reference in New Issue
Block a user