forked from platformio/platformio-core
Fixed a "KeyError: Invalid board option 'build.cpu'" when using a precompiled library with a board that does not have a CPU field in the manifest // Resolve #405
This commit is contained in:
@ -11,6 +11,8 @@ PlatformIO Core 5
|
||||
5.2.1 (2021-??-??)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Fixed a "KeyError: Invalid board option 'build.cpu'" when using a precompiled library with a board that does not have a CPU field in the manifest (`issue #4056 <https://github.com/platformio/platformio-core/issues/4056>`_)
|
||||
|
||||
5.2.0 (2021-09-13)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -567,7 +567,7 @@ class ArduinoLibBuilder(LibBuilderBase):
|
||||
# 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"))
|
||||
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
|
||||
|
Reference in New Issue
Block a user