“I don’t know how you stand up and talk to a Marine or a special operator and explain to them how you have a piece of software that will allow them to come home — or more likely allow them to come home — and you’re not going to allow them to use it,” he said. “I think it’s a nearly impossible argument to make outside the Valley without people being legitimately pretty upset.”

Employees at companies including Google, Microsoft and Amazon don’t see it the same way. Google, under internal pressure, abandoned its contract with the Pentagon on Project Maven, which used artificial intelligence software to improve the analysis of imagery from drones. Microsoft’s chief executive, Satya Nadella, has faced opposition from workers who want the company to end a contract with Immigration and Customs Enforcement. And Amazon employees have objected to providing facial recognition technology to police departments and other agencies.

All of this has set off a quiet — but growing — debate across corporate America in the age of Trump: What does it mean to be a patriotic company when you vehemently disagree with your nation’s leader?

Within the technology industry, the debate has been couched as a “moral and ethical” one: “We believe that Google should not be in the business of war,” employees wrote in a petition that led to the company’s withdrawal from Project Maven.

In truth, the ethical arguments are a diversion. This is political.

And there is a real danger in letting politics undermine the storied relationship between the government and Silicon Valley — Hewlett-Packard built sonar, radar and aviation equipment for the government during World War II, for example — that has led to much of the innovation we enjoy today.