mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Bitcode Driver] make sure -embed-bitcode works with -force-single-frontend-invocation.
With both force-single-frontend-invocation and embed-bitcode, we create CompileJobAction and BackendJobAction, similar to how we handle embed-bitcode with StandarCompile. This commit should only affect Bitcode mode. rdar://20796819 Swift SVN r28129
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "ToolChains.h"
|
||||
|
||||
#include "swift/Basic/Dwarf.h"
|
||||
#include "swift/Basic/Fallthrough.h"
|
||||
#include "swift/Basic/LLVM.h"
|
||||
#include "swift/Basic/Platform.h"
|
||||
#include "swift/Basic/Range.h"
|
||||
@@ -298,6 +299,15 @@ Job *Swift::constructJob(const JobAction &JA, std::unique_ptr<JobList> Inputs,
|
||||
break;
|
||||
}
|
||||
case OutputInfo::Mode::SingleCompile:
|
||||
if (isa<BackendJobAction>(JA)) {
|
||||
assert(Inputs->size() == 1 && "The Swift backend expects one input!");
|
||||
Arguments.push_back("-primary-file");
|
||||
const Job *Cmd = Inputs->front();
|
||||
Arguments.push_back(
|
||||
Cmd->getOutput().getPrimaryOutputFilename().c_str());
|
||||
break;
|
||||
}
|
||||
SWIFT_FALLTHROUGH;
|
||||
case OutputInfo::Mode::Immediate: {
|
||||
for (const Action *A : InputActions) {
|
||||
const InputAction *IA = dyn_cast<InputAction>(A);
|
||||
|
||||
Reference in New Issue
Block a user