You could try to become totally autarkic, but then you have to support a national semiconductor industry along with every industry it relies upon indefinitely, while foreign semiconductor companies won't be encumbered by restrictions to purchase every component for their process from within your country; they, at least, will have the option to go with the cheapest or the best options. And so, if you want your national semiconductor industry's chips to actually be used, you have to provide incentives for that, too, and/or require domestic electronics companies to use their chips. Then, since you're making domestic electronics companies uncompetitive, you have to incent consumers to purchase those electronics, ban or heavily tax foreign electronics...
In a modern, globalised economy, it seems to me the only way to have a semiconductor industry that isn't vulnerable to these sorts of problems is full top-down control of a substantial chunk of the economy.