diff options
author | Eugene Leviant <eleviant@accesssoftek.com> | 2019-10-18 11:58:21 +0000 |
---|---|---|
committer | Eugene Leviant <eleviant@accesssoftek.com> | 2019-10-18 11:58:21 +0000 |
commit | 5cee329c981f3e365e69fef3b05e43144df8a6e2 (patch) | |
tree | 841ba5a15f5b044f1a0019f391e1a45768ead95e /lib/Driver/ToolChains/Clang.cpp | |
parent | 28b915f1c58b6d9f347e22e042dfb17f4474db41 (diff) |
[ThinLTOCodeGenerator] Add support for index-based WPD
This is clang part of the patch. It adds -flto-unit flag for thin LTO
builds on Mac and PS4
Differential revision: https://reviews.llvm.org/D68950
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Clang.cpp')
-rw-r--r-- | lib/Driver/ToolChains/Clang.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index bfccf7a1db..55d631733a 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -3631,13 +3631,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (D.isUsingLTO() && !isDeviceOffloadAction) { Args.AddLastArg(CmdArgs, options::OPT_flto, options::OPT_flto_EQ); - - // The Darwin and PS4 linkers currently use the legacy LTO API, which - // does not support LTO unit features (CFI, whole program vtable opt) - // under ThinLTO. - if (!(RawTriple.isOSDarwin() || RawTriple.isPS4()) || - D.getLTOMode() == LTOK_Full) - CmdArgs.push_back("-flto-unit"); + CmdArgs.push_back("-flto-unit"); } } |