MSVC: Use absolute path to ldc_rt.builtins.lib

Otherwise linking only works if the directory is specified for the
linker, which may not be the case when disabling the config file via
`-conf=`.
This commit is contained in:
Martin 2018-04-01 23:44:59 +02:00
parent 24c2d3e867
commit b032cfdf65

View file

@ -54,8 +54,9 @@ void addMscrtLibs(std::vector<std::string> &args,
}
void addLibIfFound(std::vector<std::string> &args, const llvm::Twine &name) {
if (llvm::sys::fs::exists(exe_path::prependLibDir(name)))
args.push_back(name.str());
std::string candidate = exe_path::prependLibDir(name);
if (llvm::sys::fs::exists(candidate))
args.push_back(std::move(candidate));
}
void addSanitizerLibs(std::vector<std::string> &args) {