I’m pretty Herodotus was the source for that. The only problem is, Herodotus was a far removed in time from the building of the pyramids as we are from him, i.e. about 2,500 years.
The pyramids were built by slaves, but there's a modern "we had no slavery" political line of bull in Egypt and elsewhere, regarding large construction projects -- they were all volunteers, or had to "pay their taxes", and if they'd refused they'd have been killed, but, see, no slavery. Ridiculous.
That said, Herodotus' views on the Giza pyramids' construction doesn't refer to slaves; it appears to conflate the reign of Akhenaten and his offspring with that of Khufu/Khafre/Menkaure, but that was what his Egyptian sources told him. Also curious is how he describes the alleged statistics engraved on the outside of the pyramid, in the now-missing marble dressing stones; also he describes a 5/8 of a mile long 48 ft high and 60 ft wide ramped causeway that he saw with his own eyes and regards as a labor as great as the pyramids themselves, but which today is non-existent. The existence in ancient times of such a ramp might solve a few problems, but I don't know if anyone's ever tried to find its former site.
Herodotus was much closer to the problem than we were; otoh he also was told some of what we'd consider tour guide tall stories; on still another hand, he recorded what he was told, even conflicting stories, describing them as such, and occasionally speculating, as he did in his description of why the Nile floods out of season.
geopolymerization: