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(
124124 // ObjectFilePCHContainer and contain -gmodules debug info.
125125 commandLineArgs.push_back (" -gmodules" );
126126
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+
127132 return commandLineArgs;
128133}
129134
Original file line number Diff line number Diff line change 1313// CHECK-NEXT: "A"
1414// CHECK-NEXT: ],
1515// CHECK-NEXT: "commandLine": [
16+ // CHECK: "-fmodule-format=obj"
17+ // CHECK: "-dwarf-ext-refs"
1618// CHECK: "-fmodule-file-cache-key",
1719// CHECK-NEXT: "-Xcc",
1820// CHECK-NEXT: "{{.*}}{{/|\\}}A-{{.*}}.pcm",
Original file line number Diff line number Diff line change @@ -173,11 +173,18 @@ import SubE
173173// CHECK: "contextHash"
174174// CHECK-SAME: "{{.*}}"
175175
176+ // CHECK: "commandLine": [
177+ // CHECK: "-fmodule-format=obj"
178+ // CHECK: "-dwarf-ext-refs"
179+
176180/// --------Clang module B
177181// CHECK-LABEL: "modulePath": "{{.*}}{{/|\\}}B-{{.*}}.pcm",
178182// CHECK: "contextHash": "[[B_CONTEXT:.*]]",
179- // CHECK: "-o"
183+ // CHECK: "commandLine": [
184+ // CHECK: "-o"
180185// CHECK-NEXT: B-{{.*}}[[B_CONTEXT]].pcm
186+ // CHECK: "-fmodule-format=obj"
187+ // CHECK: "-dwarf-ext-refs"
181188
182189// Check make-style dependencies
183190// CHECK-MAKE-DEPS: module_deps_include_tree.swift
You can’t perform that action at this time.
0 commit comments