My understanding is that US law prohibits employees signing away their right to share the compensation information.
it does. A worker must be legally allowed to share their benefits (salary and otherwise) to members of their Union. But the law doesn't specifically say union, it's good for anyone.
Discussing it while on "company time" can certainly be controlled. You can be fired for discussing salary while on the clock. But once you step off the premisis, they cannot restrict that. Updating a spreadsheet stored on company servers, at work, while company time, however, is enforceable for a variety of reasons. Google could have canned the lot for that, provided it didn't violate other employment laws.
I've been chastisted by my manager for discussing salary with other employees outside of work. We explained how the law was on our side, and he simply got pissy and grumbled something about "you're not supposed to do that".
The whole point of it being that discouraging disclosure of benefits directly helps the company in negotiations. THEY know how much each employee is being paid, and they really do NOT want you to have that information, because it's leverage in the negotiations. So it's not even slightly surprising that they will try to prevent it. But as long as you do it off company time, off company grounds, and off company resources, they can't do jack. They can blowhard all they want, but there's no legal basis for action. In an "at-will state", you could still get fired for some random reason or no reason at all, but if they were foolish enough to open their mouths as to the reason they fired you, you could easily net a large payout in court. (any boss that specifically tells you why you were fired in front of witnesses is an idiot and needs to be fired themselves - too much litigation risk)