Skip to content

Commit d711c04

Browse files
committed
[Bridging PCH] Only emit deps for CompileJobActions rdar://31016087
1 parent 179424f commit d711c04

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/Driver/Driver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,9 @@ Job *Driver::buildJobsForAction(Compilation &C, const JobAction *JA,
20452045
if (llvm::sys::fs::is_regular_file(OutputPath))
20462046
llvm::sys::fs::remove(OutputPath);
20472047
}
2048+
}
20482049

2050+
if (isa<CompileJobAction>(JA)) {
20492051
// Choose the dependencies file output path.
20502052
if (C.getArgs().hasArg(options::OPT_emit_dependencies)) {
20512053
addAuxiliaryOutput(C, *Output, types::TY_Dependencies, OI, OutputMap);

test/Driver/bridging-pch.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
// RUN: %swiftc_driver -typecheck -disable-bridging-pch -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=NOPCHJOB
1616
// NOPCHJOB: {{.*}}swift -frontend {{.*}} -import-objc-header {{.*}}Inputs/bridging-header.h
1717

18+
// RUN: echo "{\"\": {\"swift-dependencies\": \"master.swiftdeps\"}}" > %t.json
19+
// RUN: %swiftc_driver -typecheck -incremental -enable-bridging-pch -output-file-map %t.json -import-objc-header %S/Inputs/bridging-header.h %s

0 commit comments

Comments
 (0)