mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Driver] Add -emit-reference-dependencies to the driver.
This just adds another possible output kind and forwards it to the frontend. Note that in builds without an output map, this will just dump the dependencies next to the output file, which is a temp file whose name is chosen randomly. That's not so useful, but we can fix it later. Part of rdar://problem/15353101 Swift SVN r23220
This commit is contained in:
@@ -810,6 +810,7 @@ void Driver::buildActions(const ToolChain &TC,
|
||||
case types::TY_SerializedDiagnostics:
|
||||
case types::TY_ObjCHeader:
|
||||
case types::TY_ClangModuleFile:
|
||||
case types::TY_SwiftDeps:
|
||||
// We could in theory handle assembly or LLVM input, but let's not.
|
||||
// FIXME: What about LTO?
|
||||
Diags.diagnose(SourceLoc(), diag::error_unknown_file_type,
|
||||
@@ -1329,6 +1330,9 @@ Job *Driver::buildJobsForAction(const Compilation &C, const Action *A,
|
||||
if (C.getArgs().hasArg(options::OPT_emit_dependencies)) {
|
||||
addAuxiliaryOutput(*Output, types::TY_Dependencies, OI, OutputMap);
|
||||
}
|
||||
if (C.getArgs().hasArg(options::OPT_emit_reference_dependencies)) {
|
||||
addAuxiliaryOutput(*Output, types::TY_SwiftDeps, OI, OutputMap);
|
||||
}
|
||||
}
|
||||
|
||||
// Choose the Objective-C header output path.
|
||||
|
||||
Reference in New Issue
Block a user