mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
Driver: Support -dumpmachine.
llvm-svn: 114155
This commit is contained in:
@@ -214,7 +214,7 @@ def dD : Flag<"-dD">, Group<d_Group>;
|
||||
def dM : Flag<"-dM">, Group<d_Group>;
|
||||
def dead__strip : Flag<"-dead_strip">;
|
||||
def dependency_file : Separate<"-dependency-file">;
|
||||
def dumpmachine : Flag<"-dumpmachine">, Flags<[Unsupported]>;
|
||||
def dumpmachine : Flag<"-dumpmachine">;
|
||||
def dumpspecs : Flag<"-dumpspecs">, Flags<[Unsupported]>;
|
||||
def dumpversion : Flag<"-dumpversion">;
|
||||
def dylib__file : Separate<"-dylib_file">;
|
||||
|
||||
@@ -387,6 +387,11 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
|
||||
// The order these options are handled in gcc is all over the place, but we
|
||||
// don't expect inconsistencies w.r.t. that to matter in practice.
|
||||
|
||||
if (C.getArgs().hasArg(options::OPT_dumpmachine)) {
|
||||
llvm::outs() << C.getDefaultToolChain().getTripleString() << '\n';
|
||||
return false;
|
||||
}
|
||||
|
||||
if (C.getArgs().hasArg(options::OPT_dumpversion)) {
|
||||
llvm::outs() << CLANG_VERSION_STRING "\n";
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user