Driver: Support -Oz as an alias for -Os.

llvm-svn: 119003
This commit is contained in:
Daniel Dunbar 2010-11-13 18:17:11 +00:00
parent 641baf1646
commit fc8aefb0ba
1 changed files with 4 additions and 0 deletions

View File

@ -1139,6 +1139,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
else if (A->getOption().matches(options::OPT_O) &&
A->getValue(Args)[0] == '\0')
CmdArgs.push_back("-O2");
else if (A->getOption().matches(options::OPT_O) &&
A->getValue(Args)[0] == 'z' &&
A->getValue(Args)[1] == '\0')
CmdArgs.push_back("-Os");
else
A->render(Args, CmdArgs);
}