Add -Xcpp CLI option for C preprocessor flags (-P with ldmd2)

This commit is contained in:
Martin Kinkelin 2023-06-05 17:25:43 +02:00
parent 5b137768a0
commit 1bf7e28c59
5 changed files with 23 additions and 13 deletions

View file

@ -46,7 +46,9 @@ FileName runCPreprocessor(FileName csrcfile, const Loc &loc, bool &ifile,
for (const auto &ccSwitch : opts::ccSwitches) {
args.push_back(ccSwitch);
}
// TODO: -Xcpp switches?
for (const auto &cppSwitch : opts::cppSwitches) {
args.push_back(cppSwitch);
}
if (isMSVC) {
args.push_back("/P"); // run preprocessor