From: Rabbi Moshe Sofer
To: Rabbi David Katz
A community must build cemetery walls, but non-Jewish contractors refuse to rest on both Shabbos and Sunday, and authorities may revoke the building permit if work is delayed. The Chasam Sofer rules leniently, reasoning that the Magen Avraham's chillul Hashem concern does not apply when delay risks total project cancellation, but requires the community to first offer extra pay for Shabbos rest.
Source: Shu"t Chasam Sofer OC §61