Is it possible to compile to a shared build_path?

Can compiling be made more efficient (and faster) by reusing already-compiled library modules?

When batch-compiling a couple dozen ESP’s (e.g. to deploy an updated version), I notice that the compiler repeats its work for every device.

I’ve tried pointing the configs at the same build_path, but the compiler ends up just doing a ‘clean’ when it realizes the build_path has another device’s object code in it. So all those library files have to be recompiled again, and again, and again…

Perhaps this is a simple config tweak to platformio? I’ve never used platformio before, so I’m blind as to what it may be capable of.

1 Like

I was looking for exactly this, did you manage to make it work by any chance?

Nope. Tried just using a static build_path, but it found the previous build’s output belonged to a different config, and cleaned it before starting the new build.
It’s a shame, since it looks like the vast majority of the .o files that were there just had to get compiled all over again.

Did either of you figure this out?

Nothing here …