Generally speaking, fund managers will work with their attorneys to defer costs until the fund does a first close. Then, the fund manager can use some of the management fees and sometimes the fund itself to pay for expenses.
With regards to fund formation attorneys, please read the following:
Raising your first fund? VC Lab has helped launch 950+ venture firms, with no fees and no equity taken. The average Start Fund reaches first close in 58 days.