From c4388a690499a3080a3099aed80379e490e5fe89 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 6 May 2022 10:31:34 +0300 Subject: [PATCH] =?UTF-8?q?Fixed=20an=20issue=20when=20LDF=20ignores=20bui?= =?UTF-8?q?ld=5Fsrc=5Fflags=20in=20the=20=E2=80=9Cdeep+=E2=80=9D=20mode=20?= =?UTF-8?q?//=20Resolve=20#4253?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.rst | 4 +++- examples | 2 +- platformio/builder/tools/piolib.py | 10 ++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index c7c25591..220a2576 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,7 @@ Release Notes ============= .. |PIOCONF| replace:: `"platformio.ini" `__ configuration file +.. |LDF| replace:: `LDF `__ .. _release_notes_6: @@ -72,9 +73,10 @@ Please check `Migration guide from 5.x to 6.0 `__ ignores the project `lib_deps `__ while resolving library dependencies (`issue #3598 `_) + - Fixed an issue when |LDF| ignores the project `lib_deps `__ while resolving library dependencies (`issue #3598 `_) - Fixed an issue with calling an extra script located outside a project (`issue #4220 `_) - Fixed an issue when GCC preprocessor was applied to the ".s" assembly files on case-sensitive OS such as Window OS (`issue #3917 `_) + - Fixed an issue when |LDF| ignores `build_src_flags `__ in the "deep+" mode (`issue #4253 `_) * **Integration** diff --git a/examples b/examples index 5240b19d..cb4befb5 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 5240b19d2dcc76b566091c8b7ce0eeb8d485de5b +Subproject commit cb4befb56b07a785907ef058738e0a4f1382dffa diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 29976d62..55f1b7d1 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -900,13 +900,19 @@ class ProjectAsLibBuilder(LibBuilderBase): # pylint: disable=no-member return self.env.get("SRC_FILTER") or LibBuilderBase.src_filter.fget(self) + @property + def build_flags(self): + # pylint: disable=no-member + return self.env.get("SRC_BUILD_FLAGS") or LibBuilderBase.build_flags.fget(self) + @property def dependencies(self): return self.env.GetProjectOption("lib_deps", []) def process_extra_options(self): - # skip for project, options are already processed - pass + with fs.cd(self.path): + self.env.ProcessFlags(self.build_flags) + self.env.ProcessUnFlags(self.build_unflags) def install_dependencies(self): def _is_builtin(spec):