Skip to content

Commit

Permalink
Project's "lib_compat_mode" has higher priority than "library.json"
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jan 23, 2021
1 parent ef6e70a commit 484567f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions platformio/builder/tools/piolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,14 @@ def lib_ldf_mode(self):

@property
def lib_compat_mode(self):
mode = self._manifest.get("build", {}).get(
"libCompatMode",
missing = object()
mode = self.env.GetProjectConfig().getraw(
"env:" + self.env["PIOENV"], "lib_compat_mode", missing
)
if mode == missing:
mode = self._manifest.get("build", {}).get(
"libCompatMode",
)
if not mode and self._manifest.get("platforms"):
mode = "strict"
# pylint: disable=no-member
Expand Down

0 comments on commit 484567f

Please sign in to comment.