Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

remove -MMD from complier args for intellisesne #1208

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/arduino/intellisense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down