From 8c221b84caff1f10ef4aad5c6ff77d36633f607c Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Mon, 1 Aug 2011 19:58:48 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136644 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 5fd2b9b486..9748da449c 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2841,7 +2841,10 @@ void darwin::Compile::ConstructJob(Compilation &C, const JobAction &JA, 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()); -- 2.40.0