Skip to content

Commit 1e4912b

Browse files
authored
Merge pull request #28579 from nkcsgexi/track-system-dependencies
Driver: flip the flag of whether tracking system dependencies
2 parents b7d0264 + 9b49a4c commit 1e4912b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/Driver/ToolChains.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ ToolChain::constructInvocation(const CompileJobAction &job,
466466
Arguments.push_back("-runtime-compatibility-version");
467467
Arguments.push_back(arg->getValue());
468468
}
469+
if (context.Args.hasArg(options::OPT_track_system_dependencies)) {
470+
Arguments.push_back("-track-system-dependencies");
471+
}
469472

470473
context.Args.AddLastArg(
471474
Arguments,

test/Driver/emit-dependencies.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: %swiftc_driver_plain -emit-executable %s -o %t.out -emit-module -emit-module-path %t.swiftmodule -emit-objc-header-path %t.h -serialize-diagnostics -emit-dependencies -parseable-output -driver-skip-execution 2>&1 | %FileCheck %s --check-prefix=CHECK-OFF
2+
// RUN: %swiftc_driver_plain -emit-executable %s -o %t.out -emit-module -emit-module-path %t.swiftmodule -emit-objc-header-path %t.h -serialize-diagnostics -emit-dependencies -parseable-output -track-system-dependencies -driver-skip-execution 2>&1 | %FileCheck %s --check-prefix=CHECK-ON
3+
4+
// CHECK-OFF-NOT: -track-system-dependencies
5+
// CHECK-ON: -track-system-dependencies

0 commit comments

Comments
 (0)