Mercurial > projects > ldc
annotate premake.lua @ 650:aa6a0b7968f7
Added test case for bug #100
Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 17:28:15 +0200 |
parents | 723806dc48d8 |
children | 6aaa3d3c1183 |
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 |
544
1c7220171d41
Disable boehm gc by default. Use --enable-boehm-gc on premake to enable.
Christian Kamm <kamm incasoftware de>
parents:
366
diff
changeset
|
9 USE_BOEHM_GC = 0 |
1c7220171d41
Disable boehm gc by default. Use --enable-boehm-gc on premake to enable.
Christian Kamm <kamm incasoftware de>
parents:
366
diff
changeset
|
10 if OS ~= "windows" then |
1c7220171d41
Disable boehm gc by default. Use --enable-boehm-gc on premake to enable.
Christian Kamm <kamm incasoftware de>
parents:
366
diff
changeset
|
11 addoption("enable-boehm-gc", "Enable use of the Boehm GC (broken!)") |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
12 |
544
1c7220171d41
Disable boehm gc by default. Use --enable-boehm-gc on premake to enable.
Christian Kamm <kamm incasoftware de>
parents:
366
diff
changeset
|
13 if options["enable-boehm-gc"] then |
295
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
14 USE_BOEHM_GC = 1 |
895e1b50cf2a
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
lindquist
parents:
285
diff
changeset
|
15 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
|
16 end |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
17 |
571
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
18 -- are we on a Posix system? |
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
19 POSIX = 1 |
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
20 if OS == "windows" then |
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
21 POSIX = 0 |
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
22 end |
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
23 |
336 | 24 -- D version - don't change these !!! |
25 DMDV1 = "1" | |
26 | |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
27 -- idgen |
1 | 28 package = newpackage() |
29 package.name = "idgen" | |
30 package.kind = "exe" | |
31 package.language = "c++" | |
32 package.files = { "dmd/idgen.c" } | |
33 package.buildoptions = { "-x c++" } | |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
34 package.postbuildcommands = { "./idgen", "mv -f id.c id.h dmd" } |
336 | 35 package.defines = { "DMDV1="..DMDV1 } |
1 | 36 |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
37 -- impcnvgen |
1 | 38 package = newpackage() |
39 package.name = "impcnvgen" | |
40 package.kind = "exe" | |
41 package.language = "c++" | |
42 package.files = { "dmd/impcnvgen.c" } | |
43 package.buildoptions = { "-x c++" } | |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
44 package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" } |
336 | 45 package.defines = { "DMDV1="..DMDV1 } |
46 | |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
47 -- llvmdc |
1 | 48 package = newpackage() |
35
3cfcb944304e
[svn r39] * Updated to DMD 1.022 with the exception of:
lindquist
parents:
4
diff
changeset
|
49 package.bindir = "bin" |
1 | 50 package.name = "llvmdc" |
51 package.kind = "exe" | |
52 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
|
53 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } |
366 | 54 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" } |
1 | 55 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" } |
131 | 56 package.linkoptions = { |
57 -- long but it's faster than just 'all' | |
582
723806dc48d8
Don't link in any target code, was unnecessary.
Christian Kamm <kamm incasoftware de>
parents:
581
diff
changeset
|
58 "`llvm-config --libs bitwriter linker ipo instrumentation`", |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
59 "`llvm-config --ldflags`", |
131 | 60 } |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
61 package.defines = { |
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
62 "IN_LLVM", |
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
63 "_DH", |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
64 "OPAQUE_VTBLS="..OPAQUE_VTBLS, |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
65 "USE_BOEHM_GC="..USE_BOEHM_GC, |
336 | 66 "DMDV1="..DMDV1, |
571
cbd6c8073a32
Changed all '#if linux || __APPLE__' to '#if POSIX' so we can support other platforms too, thanx for the suggestion anders.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
544
diff
changeset
|
67 "POSIX="..POSIX, |
193
aca17e55b7a5
[svn r209] Fixed: exotic array to pointer casts were broken.
lindquist
parents:
136
diff
changeset
|
68 } |
1 | 69 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
|
70 package.config.Debug.buildoptions = { "-g -O0" } |
1 | 71 --package.targetprefix = "llvm" |
4
e116aa1488e6
[svn r8] changed backend includes to always use the gen/<foo>.h prefix
lindquist
parents:
1
diff
changeset
|
72 package.includepaths = { ".", "dmd" } |
1 | 73 --package.postbuildcommands = { "cd runtime; ./build.sh; cd .." } |
268
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
74 if USE_BOEHM_GC == 1 then |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
75 package.links = { "gc" } |
23d0d9855cad
[svn r289] Fixed: right shift >> was broken for unsigned types.
lindquist
parents:
237
diff
changeset
|
76 end |