mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07: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"):
|
if self._manifest.get("precompiled") in ("true", "full"):
|
||||||
# add to LDPATH {build.mcu} folder
|
# add to LDPATH {build.mcu} folder
|
||||||
board_config = self.env.BoardConfig()
|
board_config = self.env.BoardConfig()
|
||||||
self.env.PrependUnique(
|
for key in ("build.mcu", "build.cpu"):
|
||||||
LIBPATH=os.path.join(self.src_dir, board_config.get("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
|
ldflags = [flag for flag in ldflags if flag] # remove empty
|
||||||
return " ".join(ldflags) if ldflags else None
|
return " ".join(ldflags) if ldflags else None
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user