Use custom package with remote development

Hello. I’m facing an issue that cropped up as a follow up to this question of mine, although I believe it’s a more general issue.

I followed the idea of this repository to use clang with PlatformIO, but this required me to create a custom package. As such I added a line similar to this in platformio.ini:

platform_packages = 

(note that my host machine is an Intel Mac)

Now I would like to use the remote development features of PlatformIO. I connected an STM32 board to a Raspberry Pi that I have here, and I have the setup working perfectly with gcc.

However, if I try to use clang, I face an issue when I try to run a Remote Upload: it needs clang on both the host (Intel Mac), for a prior build, and the remote machine (Raspberry, running AArch64 Linux), for the actual build that gets uploaded to the board. The file system structure is different (in macOS user files are in /Users/yourname/, in Linux in /home/yourname), and I also named my package including the architecture, so as you can see before, the one in the host has darwin_x86_64, whereas the Raspberry one would have linux_aarch64 in its place.

I suppose there are workarounds such as finding a global path that’s common between macOS and Linux, and removing the architecture name from the file. But I’m looking for a “clean” solution to the problem, which would basically be a way to specify a different value for platform_packages depending on whether it’s running the local or remote tasks. Is there a syntax for this, or do you suggest I create a feature request on GitHub?