mirror of
https://github.com/esphome/esphome.git
synced 2026-08-25 15:46:20 +00:00
Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra
This commit is contained in:
@@ -55,8 +55,9 @@ DEFAULT_BUILD_SRC_DIRS = "src"
|
||||
DEFAULT_BUILD_INCLUDE_DIR = "include"
|
||||
DEFAULT_BUILD_FLAGS = []
|
||||
# Suffix -> compiler kind (PlatformIO's CSUFFIXES/CXXSUFFIXES/ASSUFFIXES);
|
||||
# "asm" merges SCons's AS and ASPP sets. Per CXXSUFFIXES .C/.C++ are C++
|
||||
# here, even where SCons demotes .C on case-insensitive filesystems.
|
||||
# "aspp" is SCons's preprocessed-assembly set, "asm" its plain-assembler
|
||||
# set (no preprocessor, defines, or includes). Per CXXSUFFIXES .C/.C++ are
|
||||
# C++ here, even where SCons demotes .C on case-insensitive filesystems.
|
||||
SOURCE_KIND_FOR_SUFFIX: dict[str, str] = {
|
||||
".c": "c",
|
||||
".cpp": "cxx",
|
||||
@@ -65,10 +66,10 @@ SOURCE_KIND_FOR_SUFFIX: dict[str, str] = {
|
||||
".c++": "cxx",
|
||||
".C": "cxx",
|
||||
".C++": "cxx",
|
||||
".S": "asm",
|
||||
".spp": "asm",
|
||||
".SPP": "asm",
|
||||
".sx": "asm",
|
||||
".S": "aspp",
|
||||
".spp": "aspp",
|
||||
".SPP": "aspp",
|
||||
".sx": "aspp",
|
||||
".s": "asm",
|
||||
".asm": "asm",
|
||||
".ASM": "asm",
|
||||
|
||||
@@ -905,11 +905,11 @@ def test_split_flag_entry_non_string_is_clean() -> None:
|
||||
|
||||
|
||||
def test_source_kind_map_shape() -> None:
|
||||
"""The kind values the native compile rules key on, and the deliberate
|
||||
AS/ASPP merge (.s and .S both map to asm)."""
|
||||
"""The kind values the native compile rules key on; the AS/ASPP split
|
||||
matches SCons (.S preprocessed, .s plain assembler)."""
|
||||
|
||||
assert set(SOURCE_KIND_FOR_SUFFIX.values()) == {"c", "cxx", "asm"}
|
||||
assert set(SOURCE_KIND_FOR_SUFFIX.values()) == {"c", "cxx", "asm", "aspp"}
|
||||
assert SOURCE_KIND_FOR_SUFFIX[".s"] == "asm"
|
||||
assert SOURCE_KIND_FOR_SUFFIX[".S"] == "asm"
|
||||
assert SOURCE_KIND_FOR_SUFFIX[".S"] == "aspp"
|
||||
assert SOURCE_KIND_FOR_SUFFIX[".c"] == "c"
|
||||
assert SOURCE_KIND_FOR_SUFFIX[".cpp"] == "cxx"
|
||||
|
||||
Reference in New Issue
Block a user