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