Skip to content

Commit 0876a3e

Browse files
Fix the command-line option from depscanner after caching option rename
1 parent 50d2f4d commit 0876a3e

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

lib/ClangImporter/ClangModuleDependencyScanner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void ClangImporter::recordModuleDependencies(
239239
clangModuleDep.IncludeTreeID ? *clangModuleDep.IncludeTreeID : "";
240240

241241
if (ctx.ClangImporterOpts.CASOpts) {
242-
swiftArgs.push_back("-enable-cas");
242+
swiftArgs.push_back("-cache-compile-job");
243243
if (!ctx.ClangImporterOpts.CASOpts->CASPath.empty()) {
244244
swiftArgs.push_back("-cas-path");
245245
swiftArgs.push_back(ctx.ClangImporterOpts.CASOpts->CASPath);
@@ -346,7 +346,7 @@ void ClangImporter::recordBridgingHeaderOptions(
346346
llvm::for_each(clangArgs, addClangArg);
347347

348348
if (ctx.ClangImporterOpts.CASOpts) {
349-
swiftArgs.push_back("-enable-cas");
349+
swiftArgs.push_back("-cache-compile-job");
350350
if (!ctx.ClangImporterOpts.CASOpts->CASPath.empty()) {
351351
swiftArgs.push_back("-cas-path");
352352
swiftArgs.push_back(ctx.ClangImporterOpts.CASOpts->CASPath);

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
16041604
if (clangImporterOpts.CASOpts) {
16051605
genericSubInvocation.getClangImporterOptions().CASOpts =
16061606
clangImporterOpts.CASOpts;
1607-
GenericArgs.push_back("-enable-cas");
1607+
GenericArgs.push_back("-cache-compile-job");
16081608
if (!clangImporterOpts.CASOpts->CASPath.empty()) {
16091609
GenericArgs.push_back("-cas-path");
16101610
GenericArgs.push_back(clangImporterOpts.CASOpts->CASPath);

test/CAS/module_deps.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ import SubE
124124
// CHECK: "commandLine": [
125125
// CHECK: "-compile-module-from-interface"
126126
// CHECK: "-target"
127+
// CHECK: "-cache-compile-job"
128+
// CHECK: "-cas-path"
127129
// CHECK: "-module-name"
128130
// CHECK: "G"
129131
// CHECK: "-swift-version"

test/CAS/module_deps_include_tree.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ import SubE
119119
// CHECK: "commandLine": [
120120
// CHECK: "-compile-module-from-interface"
121121
// CHECK: "-target"
122+
// CHECK: "-cache-compile-job"
123+
// CHECK: "-cas-path"
122124
// CHECK: "-module-name"
123125
// CHECK: "G"
124126
// CHECK: "-swift-version"

0 commit comments

Comments
 (0)