Disable Berry scripts when running Arduino IDF libs build with HybridCompile (#24719)

This commit is contained in:
Jason2866
2026-05-07 13:08:03 +02:00
committed by GitHub
parent 68a67f5539
commit d6146824cf
3 changed files with 26 additions and 0 deletions
+8
View File
@@ -24,6 +24,14 @@ import subprocess
from colorama import Fore
# Skip during the espidf libs compile phase that runs first when
# `custom_sdkconfig` is set. The Arduino-as-component / hybrid build
# triggers a recursive SConscript("espidf.py") which sets
# ARDUINO_LIB_COMPILE_FLAG="Build" - in that pass we don't want any
# Berry action.
if env.subst("$ARDUINO_LIB_COMPILE_FLAG") == "Build":
print("berry-dump-defines: skipped (ESP-IDF libs compile phase)")
Return()
_IS_ESP32 = env["PIOPLATFORM"] == "espressif32"
+9
View File
@@ -23,6 +23,15 @@ import re
from colorama import Fore
# Skip during the espidf libs compile phase that runs first when
# `custom_sdkconfig` is set. The Arduino-as-component / hybrid build
# triggers a recursive SConscript("espidf.py") which sets
# ARDUINO_LIB_COMPILE_FLAG="Build" - in that pass we don't want to
# regenerate Berry artifacts.
if env.subst("$ARDUINO_LIB_COMPILE_FLAG") == "Build":
print("gen-berry-defines: skipped (ESP-IDF libs compile phase)")
Return()
# ---------------------------------------------------------------------------
# Regex patterns
# ---------------------------------------------------------------------------
+9
View File
@@ -7,6 +7,15 @@ import json
import subprocess
from os.path import join, isfile
# Skip during the espidf libs compile phase that runs first when
# `custom_sdkconfig` is set. The Arduino-as-component / hybrid build
# triggers a recursive SConscript("espidf.py") which sets
# ARDUINO_LIB_COMPILE_FLAG="Build" - in that pass we don't want to
# regenerate Berry artifacts.
if env.subst("$ARDUINO_LIB_COMPILE_FLAG") == "Build":
print("gen-berry-structures: skipped (ESP-IDF libs compile phase)")
Return()
# generate all precompiled Berry structures from multiple modules
CURRENT_DIR = os.getcwd()
PROJECT_DIR = env.subst("$PROJECT_DIR")