Shares of Northrop Grumman and Lockheed Martin were under pressure after President Donald Trump raised the idea of large cuts to defense spending.