From e656aca2c3d886f04a69262fc4ccf341bf0c5140 Mon Sep 17 00:00:00 2001 From: Petr Penzin Date: Fri, 9 Jun 2017 15:10:47 -0700 Subject: [PATCH] Disable setting default optimization level to 1 We used to set -O1 for the optimizer if user did not specify anything. Fix for #9 --- lib/Driver/Tools.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 19f893763b..984ca55142 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -4642,10 +4642,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-triple"); CmdArgs.push_back(Args.MakeArgString(TripleStr)); - // For FLANG, we want to pass -O1 as the default, iff no -O was given - if (IsFlang && (!Args.getLastArg(options::OPT_O_Group))) - CmdArgs.push_back("-O1"); - if (IsCuda) { // We have to pass the triple of the host if compiling for a CUDA device and // vice-versa.