Mercurial > projects > ldc
changeset 396:b0feb180ce55
Automated merge with http://hg.dsource.org/projects/llvmdc
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 26 Jul 2008 15:12:48 +0200 |
parents | 38979a6fe480 (diff) 71a40b62b408 (current diff) |
children | 9ec89aad9dbc |
files | |
diffstat | 3 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/linker.cpp Sat Jul 26 15:00:57 2008 +0200 +++ b/gen/linker.cpp Sat Jul 26 15:12:48 2008 +0200 @@ -108,21 +108,22 @@ switch(global.params.optimizeLevel) { case 0: - s = "-O0"; break; + args.push_back("-disable-opt"); + args.push_back("-globaldce"); + break; case 1: - s = "-O1"; break; + args.push_back("-disable-opt"); + args.push_back("-globaldce"); + args.push_back("-mem2reg"); case 2: - s = "-O2"; break; case 3: - s = "-O3"; break; case 4: - s = "-O4"; break; case 5: - s = "-O5"; break; + // use default optimization + break; default: assert(0); } - args.push_back(s); } // inlining @@ -156,6 +157,10 @@ args.push_back("-ldl"); args.push_back("-lm"); } + else if (global.params.isWindows) + { + // FIXME: I'd assume kernel32 etc + } // object files for (int i = 0; i < global.params.objfiles->dim; i++)
--- a/gen/toobj.cpp Sat Jul 26 15:00:57 2008 +0200 +++ b/gen/toobj.cpp Sat Jul 26 15:12:48 2008 +0200 @@ -175,7 +175,7 @@ // write bytecode { - Logger::println("Writing LLVM bitcode\n"); + Logger::println("Writing LLVM bitcode to: %s\n", bcpath.c_str()); std::ofstream bos(bcpath.c_str(), std::ios::binary); llvm::WriteBitcodeToFile(ir.module, bos); }