annotate premake.lua @ 295:895e1b50cf2a trunk

[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42; There was problems with most non basic types... Added an option to premake so we can do: premake --target gnu --no-boehm to disable the Boehm GC.
author lindquist
date Mon, 23 Jun 2008 14:48:42 +0200
parents 297690b5d4a5
children aaade6ded589
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
lindquist@285 9 if OS == "windows" then
lindquist@295 10 USE_BOEHM_GC = 0
lindquist@285 11 else
lindquist@295 12 addoption("no-boehm", "Disable use of the Boehm GC")
lindquist@295 13
lindquist@295 14 if options["no-boehm"] then
lindquist@295 15 USE_BOEHM_GC = 0
lindquist@295 16 else
lindquist@295 17 USE_BOEHM_GC = 1
lindquist@295 18 end
lindquist@285 19 end
lindquist@268 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@1 29
lindquist@268 30 -- impcnvgen
lindquist@1 31 package = newpackage()
lindquist@1 32 package.name = "impcnvgen"
lindquist@1 33 package.kind = "exe"
lindquist@1 34 package.language = "c++"
lindquist@1 35 package.files = { "dmd/impcnvgen.c" }
lindquist@1 36 package.buildoptions = { "-x c++" }
lindquist@35 37 package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" }
lindquist@1 38
lindquist@268 39 -- llvmdc
lindquist@1 40 package = newpackage()
lindquist@35 41 package.bindir = "bin"
lindquist@1 42 package.name = "llvmdc"
lindquist@1 43 package.kind = "exe"
lindquist@1 44 package.language = "c++"
lindquist@136 45 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") }
lindquist@1 46 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" }
lindquist@1 47 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" }
lindquist@131 48 package.linkoptions = {
lindquist@131 49 -- long but it's faster than just 'all'
lindquist@237 50 "`llvm-config --libs core asmparser bitreader bitwriter linker support target transformutils scalaropts ipo instrumentation x86 powerpc`",
lindquist@193 51 "`llvm-config --ldflags`",
lindquist@131 52 }
lindquist@193 53 package.defines = {
lindquist@193 54 "IN_LLVM",
lindquist@193 55 "_DH",
lindquist@268 56 "OPAQUE_VTBLS="..OPAQUE_VTBLS,
lindquist@268 57 "USE_BOEHM_GC="..USE_BOEHM_GC,
lindquist@193 58 }
lindquist@1 59 package.config.Release.defines = { "LLVMD_NO_LOGGER" }
lindquist@86 60 package.config.Debug.buildoptions = { "-g -O0" }
lindquist@1 61 --package.targetprefix = "llvm"
lindquist@4 62 package.includepaths = { ".", "dmd" }
lindquist@1 63 --package.postbuildcommands = { "cd runtime; ./build.sh; cd .." }
lindquist@268 64 if USE_BOEHM_GC == 1 then
lindquist@268 65 package.links = { "gc" }
lindquist@268 66 end