[cfe-commits] r136644 - /cfe/trunk/lib/Driver/Tools.cpp
Chad Rosier
mcrosier at apple.com
Mon Aug 1 12:58:48 PDT 2011
Author: mcrosier
Date: Mon Aug 1 14:58:48 2011
New Revision: 136644
URL: http://llvm.org/viewvc/llvm-project?rev=136644&view=rev
Log:
Driver: When compiling i386 -fapple-kext code, we fallback to llvmgcc.
Unfortunately, llvmgcc doesn't always work when writing temporary output to
/dev/null. Therefore, create a temp file that is later deleted.
rdar://9837692
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=136644&r1=136643&r2=136644&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Aug 1 14:58:48 2011
@@ -2841,7 +2841,10 @@
CmdArgs.push_back("-o");
// NOTE: gcc uses a temp .s file for this, but there doesn't seem
// to be a good reason.
- CmdArgs.push_back("/dev/null");
+ const char *TmpPath = C.getArgs().MakeArgString(
+ D.GetTemporaryPath("s"));
+ C.addTempFile(TmpPath);
+ CmdArgs.push_back(TmpPath);
CmdArgs.push_back("--output-pch=");
CmdArgs.push_back(Output.getFilename());
More information about the cfe-commits
mailing list