From: Daniel Dunbar Date: Sat, 14 Mar 2009 00:15:04 +0000 (+0000) Subject: Don't run simplify lib calls with -ffreestanding (fix for already X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ddcd1409f6a417cc88ea51e085a6d86a37eb358;p=clang Don't run simplify lib calls with -ffreestanding (fix for already failing test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66991 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 6d9aaa7f75..a58e877f98 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -1203,7 +1203,7 @@ static void InitializeCompileOptions(CompileOptions &Opts) { // FIXME: There are llvm-gcc options to control these selectively. Opts.InlineFunctions = (Opts.OptimizationLevel > 1); Opts.UnrollLoops = (Opts.OptimizationLevel > 1 && !OptSize); - Opts.SimplifyLibCalls = !NoBuiltin; + Opts.SimplifyLibCalls = !NoBuiltin && !Freestanding; #ifdef NDEBUG Opts.VerifyModule = 0;