Lily didn't cast a charm to save Harry. Voldemort offered her a chance to live (at Snape's request) but instead she refused and he killed her and then tried to kill Harry. The ancient charm was called forth by her sacrifice, not by anything she cast.