microsoft / BuildXL

Microsoft Build Accelerator
MIT License
902 stars 141 forks source link

Is NMake supported by BuildXL #1286

Open jyoungman19111 opened 3 years ago

jyoungman19111 commented 3 years ago

Is NMake supported by the BuildXl tool? If so, can you provide example code? Thanks.

smera commented 3 years ago

Hello. There is currently no 'first class' support for NMake (in the way there is for MSBuild or JavaScript, where the build graph is provided by the underlying build coordinator and BuildXL knows how to interpret it).

On the other hand, BuildXL can schedule arbitrary tool executions, so an alternative is to get the build graph from NMake (I believe there are some NMake parsers available out there, even though I'm not familiar with them) and use it to generate DScript which can then be fed to BuildXL. E.g. DScript specs could schedule a call to NMake for each project, and these per-project calls should be ordered following the NMake graph.

AnthonyAValey commented 2 years ago

MSFT Office has an internal version of nmake that allows attribution of the rules and a set of additional directives to make this work at scale, but it has not been open-sourced or merged back to public nmake. I am in the process of modernizing nmake code for maintainability as well as performance at Office build scale, so maybe it makes sense to revisit this if there are more than a handful of customers who want to use nmake + BuildXL