From dfaba71dcecd3387d12632bf6d5db544e2979b5e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 10 May 2009 18:14:36 +0200 Subject: [PATCH] Fix the ldcbinarypath config file rewriting. --- gen/configfile.cpp | 10 +++++----- ldc.conf.in | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gen/configfile.cpp b/gen/configfile.cpp index 3459d6a1..209421c3 100644 --- a/gen/configfile.cpp +++ b/gen/configfile.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "llvm/System/Path.h" @@ -85,6 +85,9 @@ bool ConfigFile::read(const char* argv0, void* mainAddr, const char* filename) // handle switches if (root.exists("switches")) { + std::string binpathkey = "%%ldcbinarypath%%"; + std::string binpath = sys::Path::GetMainExecutable(argv0, mainAddr).getDirname(); + libconfig::Setting& arr = cfg->lookup("default.switches"); int len = arr.getLength(); for (int i=0; i