Source Build Modifications & Removing Unwanted Platforms

Hello!

I’m aware similar questions have been asked numerous times, but I feel none have received a conclusive answer.
Is there any true way of slimming down source builds of the engine without breaking stuff or resorting to sketchy workarounds? Specifically, is it possible to completely remove unwanted target platforms (like Mac, Linux or Android, for a Windows-only project…) in such a way that

  • All source modules that rely on/are exclusive to these platforms are automatically removed
  • Any and all plugins that rely on/are exclusive to these platforms are automatically removed
  • Editor tools and settings pertaining to these platforms (e.g. the “Mac”, “Linux” and “Android” tabs in the project settings) are removed and don’t show up at all during development

essentially compiling the engine as if it was entirely unaware of these platforms?
I realize that the effect on file size and performance will probably be minuscule, but this is more a desperate attempt at decluttering the engine’s development environment.
Especially as a solo developer, I’d prefer to only see what I actually use.

I’m also aware that these are very specific asks that might not make sense for larger projects or align with the engine team’s vision.

Still, any help would be appreciated!