Set up MSVC environment for C preprocessing on Windows

This commit is contained in:
Martin Kinkelin 2023-06-07 11:58:03 +02:00
parent d94b12500b
commit 04bcdc4d06
6 changed files with 103 additions and 26 deletions

View file

@ -73,11 +73,10 @@ FileName runCPreprocessor(FileName csrcfile, const Loc &loc, bool &ifile,
const auto &triple = *global.params.targetTriple;
const bool isMSVC = triple.isWindowsMSVCEnvironment();
#if 0 //ifdef _WIN32
// TODO: INCLUDE env var etc.?
#ifdef _WIN32
windows::MsvcEnvironmentScope msvcEnv;
if (isMSVC)
msvcEnv.setup();
msvcEnv.setup(/*forPreprocessingOnly=*/true);
#endif
FileName ipath = getOutputPath(loc, csrcfile.toChars());