aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/clang.cpp2
1 files changed, 1 insertions, 1 deletions
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;