Doesn't it depend on the details of how the generator is constructed and how it is wired in? If you are interested, you can see OSHA's fact sheet
here.
I have to admit, I follow the logic of not wanting ground loops, and why you wouldn't want ground currents traveling through conduits, but I have seen out buildings treated both to separate ground rods, and ground wires derived from the main panel.
Caveat: I am not an electrician and don't play one on TV! I don't know the current NEC regulations at all well. I have seen well thought out opinions by "experts" go both ways. Certainly one interpretation of the post 2008 electrical code has a ground loop design, others don't.
Anyone who is an expert care to weigh in?
All the best,
Peter