Add LTO support (full and thin), with -flto=thin|full.

LTO needs linker support: I am only aware of support on OS X and Linux (through the LLVMgold plugin).

Resolves #693
This commit is contained in:
Johan Engelen 2016-10-16 20:48:31 +02:00
parent 54e45490cc
commit bb24fb2816
17 changed files with 361 additions and 14 deletions

View file

@ -46,8 +46,20 @@ string exe_path::getBaseDir() {
return path::parent_path(binDir);
}
string exe_path::getLibDir() {
llvm::SmallString<128> r(getBaseDir());
path::append(r, "lib");
return r.str();
}
string exe_path::prependBinDir(const char *suffix) {
llvm::SmallString<128> r(getBinDir());
path::append(r, suffix);
return r.str();
}
string exe_path::prependLibDir(const char *suffix) {
llvm::SmallString<128> r(getLibDir());
path::append(r, suffix);
return r.str();
}