File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -957,6 +957,11 @@ importer::addCommonInvocationArguments(
957
957
}
958
958
}
959
959
}
960
+
961
+ for (auto &overlay : searchPathOpts.VFSOverlayFiles ) {
962
+ invocationArgStrs.push_back (" -ivfsoverlay" );
963
+ invocationArgStrs.push_back (overlay);
964
+ }
960
965
}
961
966
962
967
bool ClangImporter::canReadPCH (StringRef PCHFilename) {
Original file line number Diff line number Diff line change @@ -185,6 +185,13 @@ ModuleDependencyVector ClangImporter::bridgeClangModuleDependencies(
185
185
swiftArgs.push_back (" -vfsoverlay" );
186
186
swiftArgs.push_back (remapPath (overlay));
187
187
}
188
+
189
+ // Pass along the SDK path
190
+ StringRef SDKPath = ctx.SearchPathOpts .getSDKPath ();
191
+ if (!SDKPath.empty ()) {
192
+ swiftArgs.push_back (" -sdk" );
193
+ swiftArgs.push_back (SDKPath.str ());
194
+ }
188
195
}
189
196
190
197
// Add args reported by the scanner.
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend -scan-dependencies -Xcc -v %s -o - | %validate-json | %FileCheck %s
3
+
4
+ // We want to explicitly import WinSDK's CRT.
5
+ // REQUIRES: OS=windows-msvc
6
+
7
+ import CRT
8
+
9
+ // CHECK: "modulePath": "{{.*}}\\ucrt-{{.*}}.pcm",
10
+ // CHECK-NEXT: "sourceFiles": [
11
+ // CHECK-NEXT: "{{.*}}\\ucrt\\module.modulemap"
You can’t perform that action at this time.
0 commit comments