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