summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2017-03-28 18:55:44 +0000
committerMehdi Amini <mehdi.amini@apple.com>2017-03-28 18:55:44 +0000
commitb5a46c1f45a7ecbcfc99b682000bbc8c0b7712a5 (patch)
tree972dd2ecfc3057b58307a5a21430ddaf51bef889 /llvm/lib/LTO/LTOCodeGenerator.cpp
parent9053f22eeb3ab0f1f0089e4e6b98093891d361bb (diff)
downloadbcm5719-llvm-b5a46c1f45a7ecbcfc99b682000bbc8c0b7712a5.tar.gz
bcm5719-llvm-b5a46c1f45a7ecbcfc99b682000bbc8c0b7712a5.zip
Add support for -fno-builtin to LTO and ThinLTO to libLTO
Reviewers: tejohnson, pcc Subscribers: Prazek, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D30791 llvm-svn: 298936
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 79f5a3c6031..86fba843e98 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -555,6 +555,8 @@ bool LTOCodeGenerator::optimize(bool DisableVerify, bool DisableInline,
if (!DisableInline)
PMB.Inliner = createFunctionInliningPass();
PMB.LibraryInfo = new TargetLibraryInfoImpl(TargetTriple);
+ if (Freestanding)
+ PMB.LibraryInfo->disableAllFunctions();
PMB.OptLevel = OptLevel;
PMB.VerifyInput = !DisableVerify;
PMB.VerifyOutput = !DisableVerify;
OpenPOWER on IntegriCloud