Skip to content

Commit 6f0d917

Browse files
committed
fix msvc toolchain
1 parent 1564f10 commit 6f0d917

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dan/cxx/msvc_toolchain.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,14 @@ def debug_files(self, output: Path) -> set[Path]:
160160
def cxxmodules_flags(self) -> list[str]:
161161
return list()
162162

163-
def make_compile_commands(self, sourcefile: Path, output: Path, options: list[str]) -> CommandArgsList:
163+
def make_compile_commands(self, sourcefile: Path, output: Path, options: list[str], build_type=None) -> CommandArgsList:
164+
if build_type is None:
165+
build_type = self.build_type
164166
deps = output.parent / sourcefile.with_suffix(".json").name
165167
args = [self.cc, *unique(self.common_flags, self.default_cflags, self.default_cxxflags, options),
166168
'/sourceDependencies', deps,
167169
f'/Fo{str(output)}', '/c', str(sourcefile)]
168-
if self.build_type.is_debug_mode:
170+
if build_type.is_debug_mode:
169171
args.append(f'/Fd{str(output.with_suffix(".pdb"))}')
170172
return [args]
171173

0 commit comments

Comments
 (0)