From a18f8b2a4c3d34db177933f5e95ceb8e4dfed95a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Oct 2019 15:28:02 +0200 Subject: [PATCH] Use default values from project options --- platformio/builder/tools/piolib.py | 7 ++++--- platformio/builder/tools/platformio.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 69d645c5..8c63934e 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -211,7 +211,7 @@ class LibBuilderBase(object): @property def lib_archive(self): - return self.env.GetProjectOption("lib_archive", True) + return self.env.GetProjectOption("lib_archive") @property def lib_ldf_mode(self): @@ -711,8 +711,9 @@ class PlatformIOLibBuilder(LibBuilderBase): @property def lib_archive(self): - global_value = self.env.GetProjectOption("lib_archive") - if global_value is not None: + unique_value = "_not_declared_%s" % id(self) + global_value = self.env.GetProjectOption("lib_archive", unique_value) + if global_value != unique_value: return global_value return self._manifest.get("build", {}).get( "libArchive", LibBuilderBase.lib_archive.fget(self) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 64638450..123e7d43 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -70,7 +70,7 @@ def _build_project_deps(env): projenv.BuildSources( "$BUILD_TEST_DIR", "$PROJECT_TEST_DIR", "$PIOTEST_SRC_FILTER" ) - if not is_test or env.GetProjectOption("test_build_project_src", False): + if not is_test or env.GetProjectOption("test_build_project_src"): projenv.BuildSources( "$BUILD_SRC_DIR", "$PROJECT_SRC_DIR", env.get("SRC_FILTER") )