annotate premake.lua @ 544:1c7220171d41

Disable boehm gc by default. Use --enable-boehm-gc on premake to enable.
author Christian Kamm <kamm incasoftware de>
date Sun, 24 Aug 2008 18:25:34 +0200
parents 1d3026702f65
children cbd6c8073a32
rev   line source
lindquist@1 1 project.name = llvmdc
lindquist@1 2
lindquist@268 3 -- options
lindquist@295 4
lindquist@295 5 -- we always make vtables opaque, it simply kills performance...
lindquist@268 6 OPAQUE_VTBLS = 1
lindquist@295 7
lindquist@295 8 -- use of boehm gc
kamm@544 9 USE_BOEHM_GC = 0
kamm@544 10 if OS ~= "windows" then
kamm@544 11 addoption("enable-boehm-gc", "Enable use of the Boehm GC (broken!)")
lindquist@295 12
kamm@544 13 if options["enable-boehm-gc"] then
lindquist@295 14 USE_BOEHM_GC = 1
lindquist@295 15 end
lindquist@285 16 end
lindquist@268 17
lindquist@336 18 -- D version - don't change these !!!
lindquist@336 19 DMDV1 = "1"
lindquist@336 20
lindquist@268 21 -- idgen
lindquist@1 22 package = newpackage()
lindquist@1 23 package.name = "idgen"
lindquist@1 24 package.kind = "exe"
lindquist@1 25 package.language = "c++"
lindquist@1 26 package.files = { "dmd/idgen.c" }
lindquist@1 27 package.buildoptions = { "-x c++" }
lindquist@35 28 package.postbuildcommands = { "./idgen", "mv -f id.c id.h dmd" }
lindquist@336 29 package.defines = { "DMDV1="..DMDV1 }
lindquist@1 30
lindquist@268 31 -- impcnvgen
lindquist@1 32 package = newpackage()
lindquist@1 33 package.name = "impcnvgen"
lindquist@1 34 package.kind = "exe"
lindquist@1 35 package.language = "c++"
lindquist@1 36 package.files = { "dmd/impcnvgen.c" }
lindquist@1 37 package.buildoptions = { "-x c++" }
lindquist@35 38 package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" }
lindquist@336 39 package.defines = { "DMDV1="..DMDV1 }
lindquist@336 40
lindquist@268 41 -- llvmdc
lindquist@1 42 package = newpackage()
lindquist@35 43 package.bindir = "bin"
lindquist@1 44 package.name = "llvmdc"
lindquist@1 45 package.kind = "exe"
lindquist@1 46 package.language = "c++"
lindquist@136 47 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") }
lindquist@366 48 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" }
lindquist@1 49 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" }
lindquist@131 50 package.linkoptions = {
lindquist@131 51 -- long but it's faster than just 'all'
lindquist@237 52 "`llvm-config --libs core asmparser bitreader bitwriter linker support target transformutils scalaropts ipo instrumentation x86 powerpc`",
lindquist@193 53 "`llvm-config --ldflags`",
lindquist@131 54 }
lindquist@193 55 package.defines = {
lindquist@193 56 "IN_LLVM",
lindquist@193 57 "_DH",
lindquist@268 58 "OPAQUE_VTBLS="..OPAQUE_VTBLS,
lindquist@268 59 "USE_BOEHM_GC="..USE_BOEHM_GC,
lindquist@336 60 "DMDV1="..DMDV1,
lindquist@193 61 }
lindquist@1 62 package.config.Release.defines = { "LLVMD_NO_LOGGER" }
lindquist@86 63 package.config.Debug.buildoptions = { "-g -O0" }
lindquist@1 64 --package.targetprefix = "llvm"
lindquist@4 65 package.includepaths = { ".", "dmd" }
lindquist@1 66 --package.postbuildcommands = { "cd runtime; ./build.sh; cd .." }
lindquist@268 67 if USE_BOEHM_GC == 1 then
lindquist@268 68 package.links = { "gc" }
lindquist@268 69 end