why not just build a foundry in the USA and sell chips?
Simple solution, avoid tariffs by building the stuff in the USA. I think you'll find the skids well greased at this time for making it happen. Just avoid putting them in "blue states". CA and NY haven't been very "business friendly" lately... and with the latest robotics, GPU and discrete component production may ultimately cost LESS.
When you build things in China their tightly locked up supply system is leveraged upon you by a complex VAT structure that makes competing suppliers COST MORE. THEN you are "locked in" possibly with capital investment. And nothing stops them from cloning your designs for "china only" distribution. Taiwan is much better, and their engineers are competent, so THAT tariff structure will probably be worked out quickly.. But I understand Foxconn is building a USA foundry, etc. and that ends the tariff problem!
So only a short time from now tariffs won't matter much. You'll see. THIS has been the plan all along.