From 640f21c49338e317734ca516f7ad3f26526ea79e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 7 Sep 2008 15:30:34 +0200 Subject: [PATCH] Only link default native backend by default. Use the new option --add-backend to link in additional targets. --- premake.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/premake.lua b/premake.lua index dc0f4a2b..640d9527 100644 --- a/premake.lua +++ b/premake.lua @@ -5,6 +5,13 @@ project.name = llvmdc -- we always make vtables opaque, it simply kills performance... OPAQUE_VTBLS = 1 +-- enables additional backends +addoption("add-backend", "Link in more than the native LLVM backend") +EXTRA_BACKENDS="" +if options["add-backend"] then + EXTRA_BACKENDS=options["add-backend"] +end + -- use of boehm gc USE_BOEHM_GC = 0 if OS ~= "windows" then @@ -55,7 +62,7 @@ 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 core asmparser bitreader bitwriter linker support target transformutils scalaropts ipo instrumentation x86 powerpc`", + "`llvm-config --libs backend asmparser bitreader bitwriter linker ipo instrumentation " .. EXTRA_BACKENDS .. "`", "`llvm-config --ldflags`", } package.defines = {