Skip to content

Commit 4ac0c3f

Browse files
committed
Use clang-cl nostdlibinc option
1 parent b301c6e commit 4ac0c3f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/MrDocsCompilationDatabase.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,7 @@ adjustCommandLine(
445445
// implicit include paths and add the standard library
446446
// and system includes manually. That gives MrDocs
447447
// access to libc++ in a portable way.
448-
new_cmdline.emplace_back("-nostdinc++");
449-
new_cmdline.emplace_back("-nostdlib++");
448+
new_cmdline.emplace_back(is_clang_cl ? "/X" : "-nostdinc++");
450449
for (auto const& inc : (*config)->stdlibIncludes)
451450
{
452451
new_cmdline.emplace_back(is_clang_cl ? std::format("-external:I{}", inc) : std::format("-isystem{}", inc));

0 commit comments

Comments
 (0)