President Donald Trump on Wednesday signed an executive order declaring a national emergency and barring U.S. companies from using telecommunications equipment made by firms posing a national security risk, paving the way for a ban on doing business with China’s Huawei Technologies Co.