]> granicus.if.org Git - clang/commitdiff
Don't run simplify lib calls with -ffreestanding (fix for already
authorDaniel Dunbar <daniel@zuster.org>
Sat, 14 Mar 2009 00:15:04 +0000 (00:15 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 14 Mar 2009 00:15:04 +0000 (00:15 +0000)
failing test case).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66991 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp

index 6d9aaa7f75be913fdc20897e955af1dfb232a620..a58e877f988d7cd2d11947664d1798bbf43c10ff 100644 (file)
@@ -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;