[cfe-commits] r167799 - /cfe/trunk/lib/Driver/Tools.cpp
Bill Wendling
isanbard at gmail.com
Mon Nov 12 16:54:24 PST 2012
Author: void
Date: Mon Nov 12 18:54:24 2012
New Revision: 167799
URL: http://llvm.org/viewvc/llvm-project?rev=167799&view=rev
Log:
Disable accelerator tables when compiling with LTO.
LTO doesn't generate correct accelerator tables. This is due to the general lack
correct of debug info for LTO. Disable it when using LTO.
<rdar://problem/12401423>
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=167799&r1=167798&r2=167799&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Nov 12 18:54:24 2012
@@ -3780,15 +3780,22 @@
CmdArgs.push_back("-demangle");
}
- // If we are using LTO, then automatically create a temporary file path for
- // the linker to use, so that it's lifetime will extend past a possible
- // dsymutil step.
- if (Version[0] >= 116 && D.IsUsingLTO(Args) && NeedsTempPath(Inputs)) {
- const char *TmpPath = C.getArgs().MakeArgString(
- D.GetTemporaryPath("cc", types::getTypeTempSuffix(types::TY_Object)));
- C.addTempFile(TmpPath);
- CmdArgs.push_back("-object_path_lto");
- CmdArgs.push_back(TmpPath);
+ if (Version[0] >= 116 && D.IsUsingLTO(Args)) {
+ if (NeedsTempPath(Inputs)) {
+ // If we are using LTO, then automatically create a temporary file path
+ // for the linker to use, so that it's lifetime will extend past a
+ // possible dsymutil step.
+ const char *TmpPath = C.getArgs().MakeArgString(
+ D.GetTemporaryPath("cc", types::getTypeTempSuffix(types::TY_Object)));
+ C.addTempFile(TmpPath);
+ CmdArgs.push_back("-object_path_lto");
+ CmdArgs.push_back(TmpPath);
+ }
+
+ // FIXME: Disable the creation of accelerator tables when using LTO. They
+ // don't currently work and can cause other tools to bork.
+ CmdArgs.push_back("-mllvm");
+ CmdArgs.push_back("-dwarf-accel-tables=Disable");
}
// Derived from the "link" spec.
More information about the cfe-commits
mailing list