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 namespace mcld { 12 13 //===----------------------------------------------------------------------===// 14 // LinkerScript 15 //===----------------------------------------------------------------------===// LinkerScript()16LinkerScript::LinkerScript() { 17 } 18 ~LinkerScript()19LinkerScript::~LinkerScript() { 20 } 21 sysroot() const22const mcld::sys::fs::Path& LinkerScript::sysroot() const { 23 return m_SearchDirs.sysroot(); 24 } 25 setSysroot(const mcld::sys::fs::Path & pSysroot)26void LinkerScript::setSysroot(const mcld::sys::fs::Path& pSysroot) { 27 m_SearchDirs.setSysRoot(pSysroot); 28 } 29 hasSysroot() const30bool LinkerScript::hasSysroot() const { 31 return !sysroot().empty(); 32 } 33 entry() const34const std::string& LinkerScript::entry() const { 35 return m_Entry; 36 } 37 setEntry(const std::string & pEntry)38void LinkerScript::setEntry(const std::string& pEntry) { 39 m_Entry = pEntry; 40 } 41 hasEntry() const42bool LinkerScript::hasEntry() const { 43 return !m_Entry.empty(); 44 } 45 outputFile() const46const std::string& LinkerScript::outputFile() const { 47 return m_OutputFile; 48 } 49 setOutputFile(const std::string & pOutputFile)50void LinkerScript::setOutputFile(const std::string& pOutputFile) { 51 m_OutputFile = pOutputFile; 52 } 53 hasOutputFile() const54bool LinkerScript::hasOutputFile() const { 55 return !m_OutputFile.empty(); 56 } 57 58 } // namespace mcld 59