Arduino-ESP32 uses the tool GitHub - espressif/esp32-arduino-lib-builder to generate the .a
library files that make up the precompiled ESP-IDF base.
I’ve already used that thing and had some troubles (noted in Error building release/v4.2 · Issue #26 · espressif/esp32-arduino-lib-builder · GitHub), but in the end I got it working. Used it to active ESP-MDF functionality, as e.g. discussed in ESP-MDF support.