We have been to the moon and collected samples. Regardless of the why, we know it has a similar composition to the Earth. At least at the surface; seismic data suggests, for instance, that its iron core is comparativly smaller than Earth's.
All of this is inputs that led to the impact model of moon formation.
As I understand it, the currently accepted theory about how the moon formed is the giant-impact hypothesis, which is that a very large object hit the proto-Earth and the moon is the material that was "splashed" off when this happened. As such it seems at least plausible that the moon would have a similar set of elements available for semiconductor production as Earth does.