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