Quitting

I'm almost 5 weeks and having trouble quitting smoking. My Obgyn prescribed me chantix but everything I've read says it's not safe for pregnancy... So I'm confused. She's the doc that confirmed my pregnancy too...