Ummm. Primer might be the least of your concerns. I have flipped a few houses in my life and many have had heavy smokers and/or animals. If you remove all soft surfaces - carpet, curtains, anything that can retain the smoke smell - then you can try to prime it if the odor isn't insane. So after everything is out let it air out a day or two or longer.
If the smell is coming from the walls then you can try to prime and paint but it might be a total waste of time and money. I have had to redrywall the living room areas of more than a few homes. There is a good chance the insulation is soaked with the smoke smell too so that may need to be replaced - and another reason why painting hardly ever helps the extreme cases.