Use default values from project options

This commit is contained in:
Ivan Kravets
2019-10-31 15:28:02 +02:00
parent 9b65a091da
commit a18f8b2a4c
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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")
)