File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ static std::vector<std::string> getClangDepScanningInvocationArguments(
124
124
// ObjectFilePCHContainer and contain -gmodules debug info.
125
125
commandLineArgs.push_back (" -gmodules" );
126
126
127
+ // To use -gmodules we need to have a real path for the PCH; this option has
128
+ // no effect if caching is disabled.
129
+ commandLineArgs.push_back (" -Xclang" );
130
+ commandLineArgs.push_back (" -finclude-tree-preserve-pch-path" );
131
+
127
132
return commandLineArgs;
128
133
}
129
134
Original file line number Diff line number Diff line change 13
13
// CHECK-NEXT: "A"
14
14
// CHECK-NEXT: ],
15
15
// CHECK-NEXT: "commandLine": [
16
+ // CHECK: "-fmodule-format=obj"
17
+ // CHECK: "-dwarf-ext-refs"
16
18
// CHECK: "-fmodule-file-cache-key",
17
19
// CHECK-NEXT: "-Xcc",
18
20
// CHECK-NEXT: "{{.*}}{{/|\\}}A-{{.*}}.pcm",
Original file line number Diff line number Diff line change @@ -173,11 +173,18 @@ import SubE
173
173
// CHECK: "contextHash"
174
174
// CHECK-SAME: "{{.*}}"
175
175
176
+ // CHECK: "commandLine": [
177
+ // CHECK: "-fmodule-format=obj"
178
+ // CHECK: "-dwarf-ext-refs"
179
+
176
180
/// --------Clang module B
177
181
// CHECK-LABEL: "modulePath": "{{.*}}{{/|\\}}B-{{.*}}.pcm",
178
182
// CHECK: "contextHash": "[[B_CONTEXT:.*]]",
179
- // CHECK: "-o"
183
+ // CHECK: "commandLine": [
184
+ // CHECK: "-o"
180
185
// CHECK-NEXT: B-{{.*}}[[B_CONTEXT]].pcm
186
+ // CHECK: "-fmodule-format=obj"
187
+ // CHECK: "-dwarf-ext-refs"
181
188
182
189
// Check make-style dependencies
183
190
// CHECK-MAKE-DEPS: module_deps_include_tree.swift
You can’t perform that action at this time.
0 commit comments