FWIW, I am American, and I would absolutely object if Google were building weapons for the Chinese military. I would stop using Microsoft products if it turned out they supplied weapons for the Russian takeover of Crimea. I would delete my Twitter account if they were found to be building special-purpose propaganda tools to aid Turkey's Erdogan. Etc.
Complying with laws in another country is one thing. Working with a military, which necessarily has implications beyond that country's borders, is another. And of course even here there are different degrees. You can build a general-purpose secure email client and sell it to a country's military, or you can design their bombs. Where the line is I'm not sure, but at some point your activity is inherently violent, inherently adversarial to some fraction of people in the world.
I am more conflicted about at least one person I knew committed suicide because IT automation provided by Google eliminated his job. Or in general IT/industrial automation wreaking havoc on my highly populated but poor nation. Now is it just the price of progress as people here would say or should Google employees be held morally responsible for causing destruction of livelihood for many a people.
Complying with laws in another country is one thing. Working with a military, which necessarily has implications beyond that country's borders, is another. And of course even here there are different degrees. You can build a general-purpose secure email client and sell it to a country's military, or you can design their bombs. Where the line is I'm not sure, but at some point your activity is inherently violent, inherently adversarial to some fraction of people in the world.