File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,13 @@ void ClangImporter::recordModuleDependencies(
242
242
// from the depending Swift modules.
243
243
if (arg == " -target" ) {
244
244
It += 2 ;
245
+ } else if (arg == " clang" ||
246
+ arg.endswith (llvm::sys::path::get_separator ().str () + " clang" )) {
247
+ // Remove the initial path to clang executable argument, to avoid
248
+ // treating it as an executable input to compilation. It is not needed
249
+ // because the consumer of this command-line will invoke the emit-PCM
250
+ // action via swift-frontend.
251
+ It += 1 ;
245
252
} else if (arg.startswith (" -fapinotes-swift-version=" )) {
246
253
// Remove the apinotes version because we should use the language version
247
254
// specified in the interface file.
Original file line number Diff line number Diff line change @@ -126,8 +126,7 @@ import SubE
126
126
// CHECK: "commandLine": [
127
127
// CHECK-NEXT: "-frontend"
128
128
// CHECK-NEXT: "-only-use-extra-clang-opts"
129
- // CHECK-NEXT: "-Xcc"
130
- // CHECK-NEXT: "BUILD_DIR/bin/clang"
129
+ // CHECK-NOT: "BUILD_DIR/bin/clang"
131
130
// CHECK: "-fsystem-module",
132
131
// CHECK-NEXT: "-emit-pcm",
133
132
// CHECK-NEXT: "-module-name",
Original file line number Diff line number Diff line change @@ -109,9 +109,8 @@ import SubE
109
109
110
110
// CHECK: "commandLine": [
111
111
// CHECK-NEXT: "-frontend"
112
- // CHECK-NEXT: "-only-use-extra-clang-opts"
113
- // CHECK-NEXT: "-Xcc"
114
- // CHECK-NEXT: "BUILD_DIR/bin/clang"
112
+ // CHECK-NEXT: "-only-use-extra-clang-opts
113
+ // CHECK-NOT: "BUILD_DIR/bin/clang"
115
114
// CHECK-NEXT: "-Xcc"
116
115
// CHECK-NEXT: "-fsyntax-only",
117
116
// CHECK: "-fsystem-module",
You can’t perform that action at this time.
0 commit comments