Skip to content

Commit 12dd83d

Browse files
authored
Merge pull request swiftlang#33670 from artemcm/ClangScannerPathPrefixes
[Dependency Scanner] Prefix Clang dependency scanner search path arguments with `-Xcc`
2 parents 5faedbd + 863bca8 commit 12dd83d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/ClangImporter/ClangModuleDependencyScanner.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,10 @@ void ClangImporter::recordModuleDependencies(
260260
// be found via search paths. Passing these headers as explicit inputs can
261261
// be quite challenging.
262262
for (auto &path: Impl.SwiftContext.SearchPathOpts.ImportSearchPaths) {
263-
swiftArgs.push_back("-I");
264-
swiftArgs.push_back(path);
263+
addClangArg("-I" + path);
265264
}
266265
for (auto &path: Impl.SwiftContext.SearchPathOpts.FrameworkSearchPaths) {
267-
swiftArgs.push_back(path.IsSystem ? "-Fsystem": "-F");
268-
swiftArgs.push_back(path.Path);
266+
addClangArg((path.IsSystem ? "-Fsystem": "-F") + path.Path);
269267
}
270268

271269
// Swift frontend option for input file path (Foo.modulemap).

test/ScanDependencies/batch_module_scan.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// CHECK-PCM-NEXT: },
2929
// CHECK-PCM-NEXT: {
3030
// CHECK-PCM-NEXT: "modulePath": "F.pcm",
31-
// CHECK-PCM: "-I"
31+
// CHECK-PCM: "-I
3232

3333
// CHECK-SWIFT: {
3434
// CHECK-SWIFT-NEXT: "mainModuleName": "F",

0 commit comments

Comments
 (0)