Mercurial > projects > ldc
annotate premake.lua @ 439:47b64d06eb9f
Enable array bounds check and emit them in IndexExp.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 30 Jul 2008 18:38:56 +0200 |
parents | 1d3026702f65 |
children | 1c7220171d41 |
rev | line source |
---|---|
1 | 1 project.name = llvmdc |
2 | |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
3 -- options |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
4 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
5 -- we always make vtables opaque, it simply kills performance... |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
6 OPAQUE_VTBLS = 1 |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
7 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
8 -- use of boehm gc |
285
297690b5d4a5
[svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction.
lindquist
parents:
268
diff
changeset
|
9 if OS == "windows" then |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
10 USE_BOEHM_GC = 0 |
285
297690b5d4a5
[svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction.
lindquist
parents:
268
diff
changeset
|
11 else |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
12 addoption("no-boehm", "Disable use of the Boehm GC") |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
13 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
14 if options["no-boehm"] then |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
15 USE_BOEHM_GC = 0 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
16 else |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
17 USE_BOEHM_GC = 1 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
18 end |
285
297690b5d4a5
[svn r306] Fixed: it's now possible to compile and link llvmdc with MinGW32 and msys on Win32 :D I tried it myself ;) Building the runtime still needs some work, but it's a step in the right direction.
lindquist
parents:
268
diff
changeset
|
19 end |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
20 |
336 | 21 -- D version - don't change these !!! |
22 DMDV1 = "1" | |
23 | |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
24 -- idgen |
1 | 25 package = newpackage() |
26 package.name = "idgen" | |
27 package.kind = "exe" | |
28 package.language = "c++" | |
29 package.files = { "dmd/idgen.c" } | |
30 package.buildoptions = { "-x c++" } | |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
31 package.postbuildcommands = { "./idgen", "mv -f id.c id.h dmd" } |
336 | 32 package.defines = { "DMDV1="..DMDV1 } |
1 | 33 |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
34 -- impcnvgen |
1 | 35 package = newpackage() |
36 package.name = "impcnvgen" | |
37 package.kind = "exe" | |
38 package.language = "c++" | |
39 package.files = { "dmd/impcnvgen.c" } | |
40 package.buildoptions = { "-x c++" } | |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
41 package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" } |
336 | 42 package.defines = { "DMDV1="..DMDV1 } |
43 | |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
44 -- llvmdc |
1 | 45 package = newpackage() |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
46 package.bindir = "bin" |
1 | 47 package.name = "llvmdc" |
48 package.kind = "exe" | |
49 package.language = "c++" | |
136
0e28624814e8
[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents:
131
diff
changeset
|
50 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } |
366 | 51 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" } |
1 | 52 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" } |
131 | 53 package.linkoptions = { |
54 -- long but it's faster than just 'all' | |
237
a168a2c3ea48
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
lindquist
parents:
193
diff
changeset
|
55 "`llvm-config --libs core asmparser bitreader bitwriter linker support target transformutils scalaropts ipo instrumentation x86 powerpc`", |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
56 "`llvm-config --ldflags`", |
131 | 57 } |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
58 package.defines = { |
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
59 "IN_LLVM", |
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
60 "_DH", |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
61 "OPAQUE_VTBLS="..OPAQUE_VTBLS, |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
62 "USE_BOEHM_GC="..USE_BOEHM_GC, |
336 | 63 "DMDV1="..DMDV1, |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
64 } |
1 | 65 package.config.Release.defines = { "LLVMD_NO_LOGGER" } |
86
fd32135dca3e
[svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents:
35
diff
changeset
|
66 package.config.Debug.buildoptions = { "-g -O0" } |
1 | 67 --package.targetprefix = "llvm" |
4
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
68 package.includepaths = { ".", "dmd" } |
1 | 69 --package.postbuildcommands = { "cd runtime; ./build.sh; cd .." } |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
70 if USE_BOEHM_GC == 1 then |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
71 package.links = { "gc" } |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
72 end |