Tim Lincecum yielded a first-inning homer before retiring 18 of the next 20 hitters he confronted in seven assertive innings Tuesday as the Giants outlasted the Toronto Blue Jays, 2-1.