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