STSTM32 platform skip STM HAL library compilation

Any idea how to skip the STM HAL libraries from building everytime I build my project that does not actually use any HAL libraries?

Could you provide more details? Build log?