Skip to content

Commit 937ab67

Browse files
authored
shorten include path only for windows
since it hits compile performance
1 parent 401c7ea commit 937ab67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

builder/frameworks/arduino.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import json
2727
import semantic_version
2828
import os
29+
import sys
2930
import shutil
3031
from os.path import join
3132

@@ -44,6 +45,7 @@
4445
board_sdkconfig = board.get("espidf.custom_sdkconfig", "")
4546
entry_custom_sdkconfig = "\n"
4647
flag_custom_sdkconfig = False
48+
IS_WINDOWS = sys.platform.startswith("win")
4749

4850
if config.has_option("env:"+env["PIOENV"], "custom_sdkconfig"):
4951
entry_custom_sdkconfig = env.GetProjectOption("custom_sdkconfig")
@@ -248,7 +250,8 @@ def call_compile_libs():
248250
call_compile_libs()
249251

250252
if "arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK") and env.subst("$ARDUINO_LIB_COMPILE_FLAG") in ("Inactive", "True"):
251-
env.AddBuildMiddleware(shorthen_includes)
253+
if IS_WINDOWS:
254+
env.AddBuildMiddleware(shorthen_includes)
252255
if os.path.exists(join(platform.get_package_dir(
253256
"framework-arduinoespressif32"), "tools", "platformio-build.py")):
254257
PIO_BUILD = "platformio-build.py"

0 commit comments

Comments
 (0)