fix #667 flags list used as string

enable function and data sections
fix incorrect library search paths
This commit is contained in:
Andreas Hollandt 2014-07-16 18:14:58 +02:00
parent 491c180a54
commit 8af29baeda
9 changed files with 23 additions and 12 deletions

View file

@ -439,7 +439,9 @@ llvm::TargetMachine* createTargetMachine(
// on OS X supports a similar flag (-dead_strip) that doesn't require
// emitting the symbols into different sections. The MinGW ld doesn't seem
// to support --gc-sections at all, and FreeBSD needs more investigation.
if (!noLinkerStripDead && triple.getOS() == llvm::Triple::Linux) {
if (!noLinkerStripDead &&
(triple.getOS() == llvm::Triple::Linux || triple.getOS() == llvm::Triple::Win32))
{
#if LDC_LLVM_VER < 305
llvm::TargetMachine::setDataSections(true);
llvm::TargetMachine::setFunctionSections(true);