_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
_codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
- _nativeObjectFile(NULL), _gccPath(NULL), _assemblerPath(NULL)
+ _nativeObjectFile(NULL), _assemblerPath(NULL)
{
InitializeAllTargets();
InitializeAllAsmPrinters();
return true;
}
-void LTOCodeGenerator::setGccPath(const char* path)
-{
- if ( _gccPath )
- delete _gccPath;
- _gccPath = new sys::Path(path);
-}
-
void LTOCodeGenerator::setAssemblerPath(const char* path)
{
if ( _assemblerPath )
if ( _assemblerPath ) {
tool = *_assemblerPath;
needsCompilerOptions = false;
- }
- else if ( _gccPath ) {
- tool = *_gccPath;
} else {
// find compiler driver
tool = sys::Program::FindProgramByName("gcc");
bool addModule(class LTOModule*, std::string& errMsg);
bool setDebugInfo(lto_debug_model, std::string& errMsg);
bool setCodePICModel(lto_codegen_model, std::string& errMsg);
- void setGccPath(const char* path);
void setAssemblerPath(const char* path);
void addMustPreserveSymbol(const char* sym);
bool writeMergedModules(const char* path,
StringSet _mustPreserveSymbols;
llvm::MemoryBuffer* _nativeObjectFile;
std::vector<const char*> _codegenOptions;
- llvm::sys::Path* _gccPath;
llvm::sys::Path* _assemblerPath;
};
return cg->setCodePICModel(model, sLastErrorString);
}
-//
-// sets the path to gcc
-//
-void lto_codegen_set_gcc_path(lto_code_gen_t cg, const char* path)
-{
- cg->setGccPath(path);
-}
-
//
// sets the path to the assembler tool
//