From a651b338dfdc819dcd32acc4172d4070e564323c Mon Sep 17 00:00:00 2001 From: Adi Azulay Date: Thu, 4 Mar 2021 11:11:11 -0800 Subject: [PATCH] remove -MMD from complier args for intellisesne --- src/arduino/intellisense.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/arduino/intellisense.ts b/src/arduino/intellisense.ts index a664b923..56daeea7 100644 --- a/src/arduino/intellisense.ts +++ b/src/arduino/intellisense.ts @@ -93,7 +93,16 @@ export function makeCompilerParserContext(dc: DeviceContext): ICoCoPaContext { ccp.CCppPropertiesCStandard.C11, ccp.CCppPropertiesCppStandard.Cpp11, forcedIncludes); + + // The following 4 lines are added to prevent null.d from being created in the workspace + // directory on MacOS and Linux. This is may be a bug in intelliSense + const mmdIndex = runner.result.options.findIndex((element) => element === "-MMD"); + if (mmdIndex) { + runner.result.options.splice(mmdIndex); + } + try { + const cmd = os.platform() === "darwin" ? "Cmd" : "Ctrl"; const help = `To manually rebuild your IntelliSense configuration run "${cmd}+Alt+I"`; const pPath = path.join(ArduinoWorkspace.rootPath, constants.CPP_CONFIG_FILE);