From: Daniel Dunbar Date: Sat, 13 Nov 2010 18:17:11 +0000 (+0000) Subject: Driver: Support -Oz as an alias for -Os. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e3bc947e305b307c6bd8e5d49b5b06e2fe6bbf4;p=clang Driver: Support -Oz as an alias for -Os. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119003 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 954ec8d723..223576e71d 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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); }