diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 21:29:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 21:29:52 +0000 |
commit | 71bdee6ea1e439e02c222270c60e293cf01c0e84 (patch) | |
tree | 6a067a72193021c9bf320d0c864203ccb7b93609 /clang/lib/Driver/Driver.cpp | |
parent | 7a70c5ddbf7738b67b4af23afd554998aa0c5282 (diff) | |
download | bcm5719-llvm-71bdee6ea1e439e02c222270c60e293cf01c0e84.tar.gz bcm5719-llvm-71bdee6ea1e439e02c222270c60e293cf01c0e84.zip |
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.
llvm-svn: 67106
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index e809487466d..c2df48cbc1a 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/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); } |