mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Wire up -emit-objc-header[-path] options that don't do anything yet.
These options piggyback on the "merge module" phase of the driver because the header we output needs an entire complete module. Swift SVN r13800
This commit is contained in:
@@ -168,6 +168,7 @@ Job *Swift::constructJob(const JobAction &JA, std::unique_ptr<JobList> Inputs,
|
||||
case types::TY_Dependencies:
|
||||
case types::TY_ClangModuleFile:
|
||||
case types::TY_SerializedDiagnostics:
|
||||
case types::TY_ObjCHeader:
|
||||
case types::TY_Image:
|
||||
llvm_unreachable("Output type can never be primary output.");
|
||||
case types::TY_INVALID:
|
||||
@@ -324,6 +325,14 @@ Job *MergeModule::constructJob(const JobAction &JA,
|
||||
assert(Output->getPrimaryOutputType() == types::TY_SwiftModuleFile &&
|
||||
"The MergeModule tool only produces swiftmodule files!");
|
||||
|
||||
const std::string &ObjCHeaderOutputPath =
|
||||
Output->getAdditionalOutputForType(types::TY_ObjCHeader);
|
||||
if (!ObjCHeaderOutputPath.empty()) {
|
||||
Arguments.push_back("-emit-objc-header");
|
||||
Arguments.push_back("-emit-objc-header-path");
|
||||
Arguments.push_back(ObjCHeaderOutputPath.c_str());
|
||||
}
|
||||
|
||||
Arguments.push_back("-o");
|
||||
Arguments.push_back(Args.MakeArgString(Output->getPrimaryOutputFilename()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user