Open Bug 1326333 Opened 8 years ago Updated 2 years ago

Build directly from msvc project files

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: erahm, Unassigned)

References

(Blocks 1 open bug)

Details

I'm not sure how realistic this is, but it seems like we'd get better performance if we just built directly from a generated visual studio project rather than shelling out to mozmake. I know we currently support generating a Visual Studio project, but my understanding is when we build it still just calls mozmake. This would get us the benefits of supporting |cl|'s |/MP| argument -- multi process builds that don't spawn a new cl.exe instance for each file -- (bug 1095293) and msbuild which can build multiple projects at once. It would also avoid needing to spawn multiple processes per cl invocation (bug 1326329).
I'm not sure this would be a net win, honestly. It would mean a lot of complexity in the build system, and AFAIK most large projects don't actually build using VS projects because its build performance does not scale well.
FWIW, Microsoft claims to have made build performance of project based builds better in VS2015 and VS2017. Even if the build performance is a wash, having the project files contain rich metadata would be a win. Currently, the projects are basically skeletons saying "shell out to mach to build." All the rich metadata such as the ability to adjust compiler and linker options isn't enabled on the projects. I /think/ there are some nice IntelliSense improvements if those things are defined properly. I know blassey has experimented with richer VS projects. Presumably he had a good reason to do that.
Also, blocking this bug and anything related to "don't use make to invoke the compiler" is the ability to ascertain the full set of compiler invocations at moz.build evaluation time. We're *very* close right now, with the Clang compilation database being 95+% accurate. mshal is closing the remaining differences as part of supporting Tup to build Firefox. Once we can support N>1 build backends, rolling out new ones (including native MSVC project files) is relatively easy.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.