As others have said, so what are you going to do about this last minute discovery absent some sort of space-based planetary defense system, in which case this discussion is moot?
If it's big enough to flatten a city but not big enough to kill the ecosphere you might be able to evacuate some of the people affected if you spot it sufficiently early to calculate it's trajectory with good precision.