From b5a46c1f45a7ecbcfc99b682000bbc8c0b7712a5 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Tue, 28 Mar 2017 18:55:44 +0000 Subject: 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 --- llvm/lib/LTO/LTOCodeGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp') 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; -- cgit v1.2.3