mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Process "precompiled" and "ldflags" properties of the "library.properties" manifest // Resolve #3994
This commit is contained in:
@ -33,6 +33,7 @@ PlatformIO Core 5
|
|||||||
|
|
||||||
* **Build System**
|
* **Build System**
|
||||||
|
|
||||||
|
- Process "precompiled" and "ldflags" properties of the "library.properties" manifest (`issue #3994 <https://github.com/platformio/platformio-core/issues/3994>`_)
|
||||||
- Upgraded build engine to the SCons 4.2 (`release notes <https://github.com/SCons/scons/blob/rel_4.2.0/CHANGES.txt>`__)
|
- Upgraded build engine to the SCons 4.2 (`release notes <https://github.com/SCons/scons/blob/rel_4.2.0/CHANGES.txt>`__)
|
||||||
- Fixed an issue with broken binary file extension when a custom ``PROGNAME`` contains dot symbols (`issue #3906 <https://github.com/platformio/platformio-core/issues/3906>`_)
|
- Fixed an issue with broken binary file extension when a custom ``PROGNAME`` contains dot symbols (`issue #3906 <https://github.com/platformio/platformio-core/issues/3906>`_)
|
||||||
- Fixed an issue when PlatformIO archives a library that does not contain C/C++ source files (`issue #4019 <https://github.com/platformio/platformio-core/issues/4019>`_)
|
- Fixed an issue when PlatformIO archives a library that does not contain C/C++ source files (`issue #4019 <https://github.com/platformio/platformio-core/issues/4019>`_)
|
||||||
|
@ -547,6 +547,21 @@ class ArduinoLibBuilder(LibBuilderBase):
|
|||||||
def is_platforms_compatible(self, platforms):
|
def is_platforms_compatible(self, platforms):
|
||||||
return util.items_in_list(platforms, self._manifest.get("platforms") or ["*"])
|
return util.items_in_list(platforms, self._manifest.get("platforms") or ["*"])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def build_flags(self):
|
||||||
|
ldflags = [
|
||||||
|
LibBuilderBase.build_flags.fget(self), # pylint: disable=no-member
|
||||||
|
self._manifest.get("ldflags"),
|
||||||
|
]
|
||||||
|
if self._manifest.get("precompiled") in ("true", "full"):
|
||||||
|
# add to LDPATH {build.mcu} folder
|
||||||
|
board_config = self.env.BoardConfig()
|
||||||
|
self.env.PrependUnique(
|
||||||
|
LIBPATH=os.path.join(self.src_dir, board_config.get("build.cpu"))
|
||||||
|
)
|
||||||
|
ldflags = [flag for flag in ldflags if flag] # remove empty
|
||||||
|
return " ".join(ldflags) if ldflags else None
|
||||||
|
|
||||||
|
|
||||||
class MbedLibBuilder(LibBuilderBase):
|
class MbedLibBuilder(LibBuilderBase):
|
||||||
def load_manifest(self):
|
def load_manifest(self):
|
||||||
|
Reference in New Issue
Block a user