aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-10 23:41:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-10 23:41:59 +0000
commitdd98e2cad165ca73c769e4f105a4e47c2216387a (patch)
treea82398bf2e311fdb9d0ad37f5c78c7c6d3b762b8 /tools/driver/driver.cpp
parentfb5058ef67c054296c88db18ab1b3717845cb71d (diff)
Driver: Add host info.
- Replace assorted -ccc-host-* options by -ccc-host-triple which is more sane. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver/driver.cpp')
-rw-r--r--tools/driver/driver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index ad6c807327..b9e94b2813 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -18,6 +18,7 @@
#include "clang/Driver/Options.h"
#include "llvm/ADT/OwningPtr.h"
+#include "llvm/Config/config.h"
#include "llvm/System/Path.h"
#include "llvm/System/Signals.h"
using namespace clang::driver;
@@ -30,8 +31,11 @@ int main(int argc, const char **argv) {
// is that the path derived from this will influence search paths.
llvm::sys::Path Path(argv[0]);
+ // FIXME: Use the triple of the host, not the triple that we were
+ // compiled on.
llvm::OwningPtr<Driver> TheDriver(new Driver(Path.getBasename().c_str(),
- Path.getDirname().c_str()));
+ Path.getDirname().c_str(),
+ LLVM_HOSTTRIPLE));
llvm::OwningPtr<Compilation> C(TheDriver->BuildCompilation(argc, argv));