mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Check for "build.mcu" and "build.cpu" when looking for precompiled library // Issue #405
This commit is contained in:
@ -566,9 +566,12 @@ class ArduinoLibBuilder(LibBuilderBase):
|
||||
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", ""))
|
||||
)
|
||||
for key in ("build.mcu", "build.cpu"):
|
||||
libpath = os.path.join(self.src_dir, board_config.get(key, ""))
|
||||
if not os.path.isdir(libpath):
|
||||
continue
|
||||
self.env.PrependUnique(LIBPATH=libpath)
|
||||
break
|
||||
ldflags = [flag for flag in ldflags if flag] # remove empty
|
||||
return " ".join(ldflags) if ldflags else None
|
||||
|
||||
|
Reference in New Issue
Block a user