Mercurial > projects > ldc
view premake.lua @ 715:30b42a283c8e
Removed TypeOpaque from DMD.
Changed runtime functions taking opaque[] to void[].
Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[].
Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86.
Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing.
Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way...
Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8.
Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:55:33 +0200 |
parents | eed2de0c67a0 |
children | 6de2ed4f0abe |
line wrap: on
line source
project.name = ldc -- options -- we always make vtables opaque, it simply kills performance... OPAQUE_VTBLS = 1 -- use of boehm gc USE_BOEHM_GC = 0 if OS ~= "windows" then addoption("enable-boehm-gc", "Enable use of the Boehm GC (broken!)") if options["enable-boehm-gc"] then USE_BOEHM_GC = 1 end end -- are we on a Posix system? POSIX = 1 if OS == "windows" then POSIX = 0 end -- guess the host machine description -- also allow overriding it addoption("target-override", "Override the default target machine"); TRIPLE = ""; if options["target-override"] then TRIPLE = options["target-override"] else os.execute("sh config.guess > default-target-triple.tmp") TRIPLE = io.open("default-target-triple.tmp"):read() end io.write("Default target: '"..TRIPLE.."'\n"); -- D version - don't change these !!! DMDV1 = "1" -- idgen package = newpackage() package.name = "idgen" package.kind = "exe" package.language = "c++" package.files = { "dmd/idgen.c" } package.buildoptions = { "-x c++" } package.postbuildcommands = { "./idgen", "mv -f id.c id.h dmd" } package.defines = { "DMDV1="..DMDV1 } -- impcnvgen package = newpackage() package.name = "impcnvgen" package.kind = "exe" package.language = "c++" package.files = { "dmd/impcnvgen.c" } package.buildoptions = { "-x c++" } package.postbuildcommands = { "./impcnvgen", "mv -f impcnvtab.c dmd" } package.defines = { "DMDV1="..DMDV1 } -- ldc package = newpackage() package.bindir = "bin" package.name = "ldc" package.kind = "exe" package.language = "c++" package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" } package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" } package.linkoptions = { -- long but it's faster than just 'all' "`llvm-config --libs bitwriter linker ipo instrumentation backend`", "`llvm-config --ldflags`", } package.defines = { "IN_LLVM", "_DH", "OPAQUE_VTBLS="..OPAQUE_VTBLS, "USE_BOEHM_GC="..USE_BOEHM_GC, "DMDV1="..DMDV1, "POSIX="..POSIX, "DEFAULT_TARGET_TRIPLE=\\\""..TRIPLE.."\\\"", } package.config.Release.defines = { "LLVMD_NO_LOGGER" } package.config.Debug.buildoptions = { "-g -O0" } --package.targetprefix = "llvm" package.includepaths = { ".", "dmd" } --package.postbuildcommands = { "cd runtime; ./build.sh; cd .." } if USE_BOEHM_GC == 1 then package.links = { "gc" } end