diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-16 23:25:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-16 23:25:22 +0000 |
commit | 12cfe036d809173a25af0104844d4bb66a92252b (patch) | |
tree | 0af27a48a6fabe1a757dc95fd39f30ec78042fb7 /lib/Driver/Driver.cpp | |
parent | 25af1ed6ffa46a333886264299be98a838097b34 (diff) |
Fake support for -print-multi-*
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index d9a2c2c393..54704d4827 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -429,6 +429,47 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { return false; } + if (C.getArgs().hasArg(options::OPT_print_multi_lib)) { + // FIXME: We need tool chain support for this. + llvm::outs() << ".;\n"; + + switch (C.getDefaultToolChain().getTriple().getArch()) { + default: + break; + + case llvm::Triple::x86_64: + llvm::outs() << "x86_64;@m64" << "\n"; + break; + + case llvm::Triple::ppc64: + llvm::outs() << "ppc64;@m64" << "\n"; + break; + } + return false; + } + + // FIXME: What is the difference between print-multi-directory and + // print-multi-os-directory? + if (C.getArgs().hasArg(options::OPT_print_multi_directory) || + C.getArgs().hasArg(options::OPT_print_multi_os_directory)) { + switch (C.getDefaultToolChain().getTriple().getArch()) { + default: + case llvm::Triple::x86: + case llvm::Triple::ppc: + llvm::outs() << "." << "\n"; + break; + + case llvm::Triple::x86_64: + llvm::outs() << "x86_64" << "\n"; + break; + + case llvm::Triple::ppc64: + llvm::outs() << "ppc64" << "\n"; + break; + } + return false; + } + return true; } |