I've discussed the legitimacy and limitations of the lesser-evil principle on several occasions. Now I'd like to expand on what limits the principle. The lesser-evil principle involves a twofold comparison. At one level it involves a comparison between two or more actions or choices. If, however, that's all there was to the lesser-evil principle, it would be relativistic inasmuch as it would be confined to comparing one choice or action in relation to another.
At another, deeper level, the principle involves comparing each action to a standard of comparison. A standard of good, prudence, &c.
Take the current debate about whether to vote for Trump, vote for Hillary, cast a protest vote, or refrain from voting for president in this election cycle (although you should still vote for downballot candidates, initiatives, and referenda).
At one level, that involves a direct comparison between Trump and Hillary. Predicting what you think each candidate is likely to do as president. Predicting the impact on their respective parties.
But at another level, you're comparing each candidate to a standard of comparison that's independent of either candidate or any candidate. Certain general criteria by which you evaluate any candidate. That includes possibly disqualifying criteria. And that preserves the lesser-evil principle from relativism. It's not just a question of assessing which choice is better or worse in relation to other choices, but the goodness or prudence of that choice in relation to an absolute metric. Indeed, you can even assess which choice is better or worse unless you have a standard of comparison.
Some actions are intrinsically evil. That makes them out of bounds. The lesser-evil principle can never transgress that boundary.