1 //===- LinkerScript.cpp ---------------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #include <mcld/LinkerScript.h> 10 11 using namespace mcld; 12 13 //===----------------------------------------------------------------------===// 14 // LinkerScript 15 //===----------------------------------------------------------------------===// LinkerScript()16LinkerScript::LinkerScript() 17 { 18 } 19 ~LinkerScript()20LinkerScript::~LinkerScript() 21 { 22 } 23 sysroot() const24const mcld::sys::fs::Path& LinkerScript::sysroot() const 25 { 26 return m_SearchDirs.sysroot(); 27 } 28 setSysroot(const mcld::sys::fs::Path & pSysroot)29void LinkerScript::setSysroot(const mcld::sys::fs::Path &pSysroot) 30 { 31 m_SearchDirs.setSysRoot(pSysroot); 32 } 33 hasSysroot() const34bool LinkerScript::hasSysroot() const 35 { 36 return !sysroot().empty(); 37 } 38 entry() const39const std::string& LinkerScript::entry() const 40 { 41 return m_Entry; 42 } 43 setEntry(const std::string & pEntry)44void LinkerScript::setEntry(const std::string& pEntry) 45 { 46 m_Entry = pEntry; 47 } 48 hasEntry() const49bool LinkerScript::hasEntry() const 50 { 51 return !m_Entry.empty(); 52 } 53 outputFile() const54const std::string& LinkerScript::outputFile() const 55 { 56 return m_OutputFile; 57 } 58 setOutputFile(const std::string & pOutputFile)59void LinkerScript::setOutputFile(const std::string& pOutputFile) 60 { 61 m_OutputFile = pOutputFile; 62 } 63 hasOutputFile() const64bool LinkerScript::hasOutputFile() const 65 { 66 return !m_OutputFile.empty(); 67 } 68