Skip to content

Commit

Permalink
add ccache enable logic to sdk config editor (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 authored Feb 10, 2022
1 parent dfa4181 commit 7b76361
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/espIdf/menuconfig/confServerProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,15 @@ export class ConfserverProcess {
const idfPyPath = path.join(guiconfigEspPath, "tools", "idf.py");
const modifiedEnv = appendIdfAndToolsToPath();
const pythonBinPath = idfConf.readParameter("idf.pythonBinPath") as string;
const enableCCache = idfConf.readParameter("idf.enableCCache") as boolean;
const reconfigureArgs: string[] = [idfPyPath];
if (enableCCache) {
reconfigureArgs.push("--ccache")
}
reconfigureArgs.push("-C", currWorkspace.fsPath, "reconfigure");
const getSdkconfigProcess = spawn(
pythonBinPath,
[idfPyPath, "-C", currWorkspace.fsPath, "reconfigure"],
reconfigureArgs,
{ env: modifiedEnv }
);

Expand Down Expand Up @@ -267,9 +273,15 @@ export class ConfserverProcess {
process.env.PYTHONUNBUFFERED = "0";
const idfPath = path.join(this.espIdfPath, "tools", "idf.py");
const modifiedEnv = appendIdfAndToolsToPath();
const enableCCache = idfConf.readParameter("idf.enableCCache") as boolean;
const confServerArgs: string[] = [idfPath];
if (enableCCache) {
confServerArgs.push("--ccache")
}
confServerArgs.push("-C", workspaceFolder.fsPath, "confserver");
this.confServerProcess = spawn(
pythonBinPath,
[idfPath, "-C", workspaceFolder.fsPath, "confserver"],
confServerArgs,
{ env: modifiedEnv }
);
ConfserverProcess.progress.report({
Expand Down

0 comments on commit 7b76361

Please sign in to comment.