Taiwan Semiconductor Manufacturing Co. (TSM), the world's largest chipmaker and a major Apple supplier, said on Wednesday that it is building a second facility for the production of semiconductor chips in the U.S.

The company in 2020 committed to building a factory in the state, with that project costing about $12 billion.

TSMC's latest U.S. expansion comes following lucrative grants from Washington, as lawmakers seek to revive advanced manufacturing on American soil. The company's new facility is expected to produce 3-nanometer transistors, which are among the tiniest and most lightning-fast currently possible semiconductors.

Despite a market rocked by inflation, rising interest rates, and falling demand, chipmakers remain optimistic.

Following two years of rapid growth early in the pandemic, demand for electronic devices has shrunk. Various industries, particularly the car industry, have also been hit by an unprecedented chip shortage.

Meanwhile, chip companies, including TSMC, have scaled back on capital spending and cutting costs amid the slowdown. Major competitor Intel (INTC) in October reported third quarter earnings of $15.3 billion, a 20% decline from the previous year. The company also said it was looking at $10 billion in cost reductions by 2025.

However, chip executives expect global sales to double, crossing the $1 trillion-a-year mark in the next decade, with significant outlays in manufacturing capacity. Their spending priorities are also being shaped by incentives in Europe and the U.S. aiming to steer the industry's core operations away from Asia.

Shares of TSM at noon Wednesday were at $66.00, up $0.98, or 1.51%.