mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 19:06:37 +00:00
Close the native CI trigger gap and log the remaining silent library skips
This commit is contained in:
@@ -90,7 +90,16 @@ def _library_info(name: str, read_path: Path, data: dict) -> ArduinoLibrary:
|
||||
if tok.startswith("-I"):
|
||||
include_flags.append(tok[2:])
|
||||
elif tok.startswith("-L"):
|
||||
lib.link_dirs.append((read_path / tok[2:]).resolve())
|
||||
link_dir = (read_path / tok[2:]).resolve()
|
||||
if not link_dir.is_dir():
|
||||
# Kept anyway (the linker ignores missing -L dirs); the
|
||||
# warning names the culprit before a bare "cannot find -lfoo"
|
||||
_LOGGER.warning(
|
||||
"Library %s declares library dir %s which does not exist",
|
||||
name,
|
||||
tok[2:],
|
||||
)
|
||||
lib.link_dirs.append(link_dir)
|
||||
elif tok.startswith("-l"):
|
||||
lib.link_libs.append(tok[2:])
|
||||
elif tok.startswith("-Wl,"):
|
||||
|
||||
@@ -15,6 +15,7 @@ from the build flags with the same precedence as the PlatformIO builder.
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
@@ -41,6 +42,8 @@ from esphome.framework_helpers import get_project_cxx_compile_flags
|
||||
from esphome.helpers import mkdir_p, write_file_if_changed
|
||||
from esphome.platformio.library import join_flag_args
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Compile rule per source suffix; keys must cover SRC_FILE_EXTENSIONS so any
|
||||
# source a library manifest selects has a rule (pinned by a drift test).
|
||||
_RULE_FOR_SUFFIX = {
|
||||
@@ -607,6 +610,12 @@ def write_project(paths: dict[str, Path]) -> bool:
|
||||
|
||||
for lib in libraries:
|
||||
if not lib.sources:
|
||||
# Header-only libraries are legitimate; the log makes an empty
|
||||
# srcFilter or broken tree traceable before link errors do.
|
||||
_LOGGER.debug(
|
||||
"Library %s has no source files; contributing includes only",
|
||||
lib.name,
|
||||
)
|
||||
continue
|
||||
lib_root = _common_parent(lib.sources)
|
||||
objs = _ninja_compile_edges(
|
||||
|
||||
Reference in New Issue
Block a user