Skip to content

Commit

Permalink
shorten include path only for windows
Browse files Browse the repository at this point in the history
since it hits compile performance
  • Loading branch information
Jason2866 authored Jan 18, 2025
1 parent 401c7ea commit 937ab67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import json
import semantic_version
import os
import sys
import shutil
from os.path import join

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

if config.has_option("env:"+env["PIOENV"], "custom_sdkconfig"):
entry_custom_sdkconfig = env.GetProjectOption("custom_sdkconfig")
Expand Down Expand Up @@ -248,7 +250,8 @@ def call_compile_libs():
call_compile_libs()

if "arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK") and env.subst("$ARDUINO_LIB_COMPILE_FLAG") in ("Inactive", "True"):
env.AddBuildMiddleware(shorthen_includes)
if IS_WINDOWS:
env.AddBuildMiddleware(shorthen_includes)
if os.path.exists(join(platform.get_package_dir(
"framework-arduinoespressif32"), "tools", "platformio-build.py")):
PIO_BUILD = "platformio-build.py"
Expand Down

0 comments on commit 937ab67

Please sign in to comment.