aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-17 21:29:52 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-17 21:29:52 +0000
commitbaf07759bc5ccd6f4cab62a2d7ea23321ced7492 (patch)
treece083141021041dd582291b974af3baa2efb6427 /lib/Driver/Driver.cpp
parentfa0cda430f7324404ddd74f41a3b8f5f749d7ec1 (diff)
Driver: Make sure to get the default arch name from the tool chain, not the
host; the toolchain may differ based on command line arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index e809487466..c2df48cbc1 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -155,6 +155,8 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
ArgList *Args = ParseArgStrings(Start, End);
Host = GetHostInfo(HostTriple);
+ // FIXME: This shouldn't live inside Driver, the default tool chain
+ // is part of the compilation (it is arg dependent).
DefaultToolChain = Host->getToolChain(*Args);
// FIXME: This behavior shouldn't be here.
@@ -306,7 +308,7 @@ void Driver::BuildUniversalActions(ArgList &Args, ActionList &Actions) const {
// When there is no explicit arch for this platform, get one from
// the host so that -Xarch_ is handled correctly.
if (!Archs.size()) {
- const char *Arch = Host->getArchName().c_str();
+ const char *Arch = DefaultToolChain->getArchName().c_str();
Archs.push_back(Arch);
}