Fix an issue building the fft plugin on greyscale targets on some simulator toolchains

The fft plugin uses pluginlib osd stuff _and_ greylib together,
which results in two conflicting declarations of the _grey_info struct.

Normally we treat the one in pluginlib as __weak but we disable that on
windows simulator builds, because the osd code ends up requiring it.
due to not using-function-sections and -fdata-sections on simulator builds.
Simply disabling all of that crap doesn't seem to help.

So instead, for simulator builds, mark the fft's struct as extern, only
using the one in pluginlib.

Change-Id: I1adf9acc265a60f91b8ac0fcad9d792e3240a9d9
This commit is contained in:
Solomon Peachy 2024-06-27 20:27:58 -04:00
parent dca5fb9514
commit f3de4729ce

View file

@ -33,8 +33,13 @@
#include "lib/osd.h" #include "lib/osd.h"
#ifndef HAVE_LCD_COLOR #ifndef HAVE_LCD_COLOR
#if defined(SIMULATOR)
// Use the one in pluginlib/osd
extern GREY_INFO_STRUCT
#else
GREY_INFO_STRUCT GREY_INFO_STRUCT
#endif #endif
#endif
#include "lib/pluginlib_actions.h" #include "lib/pluginlib_actions.h"