Mercurial > projects > ldc
comparison premake.lua @ 581:8a8ee1f6b268
Only link default native backend by default.
Use the new option --add-backend to link in additional targets.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 07 Sep 2008 15:30:34 +0200 |
parents | cbd6c8073a32 |
children | 723806dc48d8 |
comparison
equal
deleted
inserted
replaced
580:7824c21a58e3 | 581:8a8ee1f6b268 |
---|---|
2 | 2 |
3 -- options | 3 -- options |
4 | 4 |
5 -- we always make vtables opaque, it simply kills performance... | 5 -- we always make vtables opaque, it simply kills performance... |
6 OPAQUE_VTBLS = 1 | 6 OPAQUE_VTBLS = 1 |
7 | |
8 -- enables additional backends | |
9 addoption("add-backend", "Link in more than the native LLVM backend") | |
10 EXTRA_BACKENDS="" | |
11 if options["add-backend"] then | |
12 EXTRA_BACKENDS=options["add-backend"] | |
13 end | |
7 | 14 |
8 -- use of boehm gc | 15 -- use of boehm gc |
9 USE_BOEHM_GC = 0 | 16 USE_BOEHM_GC = 0 |
10 if OS ~= "windows" then | 17 if OS ~= "windows" then |
11 addoption("enable-boehm-gc", "Enable use of the Boehm GC (broken!)") | 18 addoption("enable-boehm-gc", "Enable use of the Boehm GC (broken!)") |
53 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } | 60 package.files = { matchfiles("dmd/*.c"), matchfiles("gen/*.cpp"), matchfiles("ir/*.cpp") } |
54 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" } | 61 package.excludes = { "dmd/idgen.c", "dmd/impcnvgen.c" } |
55 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" } | 62 package.buildoptions = { "-x c++", "`llvm-config --cxxflags`" } |
56 package.linkoptions = { | 63 package.linkoptions = { |
57 -- long but it's faster than just 'all' | 64 -- long but it's faster than just 'all' |
58 "`llvm-config --libs core asmparser bitreader bitwriter linker support target transformutils scalaropts ipo instrumentation x86 powerpc`", | 65 "`llvm-config --libs backend asmparser bitreader bitwriter linker ipo instrumentation " .. EXTRA_BACKENDS .. "`", |
59 "`llvm-config --ldflags`", | 66 "`llvm-config --ldflags`", |
60 } | 67 } |
61 package.defines = { | 68 package.defines = { |
62 "IN_LLVM", | 69 "IN_LLVM", |
63 "_DH", | 70 "_DH", |