Destroy the units with Obliterate first, then decide what you are attacking
To be more technical about it:
First, you attack and even choose a target for the attack. Then, before combat resolves, Obliterate triggers. If the target of your attack has left play now, you must choose a new legal target for your attack if possible.